Spaces:
Runtime error
Runtime error
| from langchain.prompts import PromptTemplate | |
| from langchain.chains import LLMChain | |
| def x_bio_gen(info, tone_of_voice, llm): | |
| x_bio_prompt = f"Craft a personalized Twitter bio for me, based on the content I create, related to {info}. tone should be {tone_of_voice}, Produce 10 tailor-made Twitter bios for me." | |
| x_bio_promptTemp = PromptTemplate( | |
| input_variables=["text_input"], | |
| template="You are a copywriter\n{text_input}\n\nTwitter Bios:") | |
| x_bio_extraction_chain = LLMChain(llm=llm, prompt=x_bio_promptTemp) | |
| x_bio = x_bio_extraction_chain.run(x_bio_prompt) | |
| return x_bio | |