Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -43,12 +43,13 @@ def getblog(text_inp1,text_inp2):
|
|
| 43 |
print(datetime.today().strftime("%d-%m-%Y"))
|
| 44 |
if text_inp2!='':
|
| 45 |
#openai.api_key = text_inp2
|
| 46 |
-
|
|
|
|
| 47 |
llm = OpenAI(temperature=0,openai_api_key=text_inp2)
|
| 48 |
|
| 49 |
prompt_template = PromptTemplate(
|
| 50 |
input_variables=["query"],
|
| 51 |
-
template=
|
| 52 |
)
|
| 53 |
|
| 54 |
bloglist=[]
|
|
|
|
| 43 |
print(datetime.today().strftime("%d-%m-%Y"))
|
| 44 |
if text_inp2!='':
|
| 45 |
#openai.api_key = text_inp2
|
| 46 |
+
template_tmp=template
|
| 47 |
+
template_tmp=template_tmp.replace("{topic}",text_inp1).strip()
|
| 48 |
llm = OpenAI(temperature=0,openai_api_key=text_inp2)
|
| 49 |
|
| 50 |
prompt_template = PromptTemplate(
|
| 51 |
input_variables=["query"],
|
| 52 |
+
template=template_tmp
|
| 53 |
)
|
| 54 |
|
| 55 |
bloglist=[]
|