hra commited on
Commit
b6c7c64
·
1 Parent(s): 2117db0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -43,11 +43,11 @@ 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=template
52
  )
53
 
@@ -57,7 +57,7 @@ def getblog(text_inp1,text_inp2):
57
 
58
 
59
  llm_chain = LLMChain(prompt=prompt_template, llm=llm,verbose=True)
60
- result=llm_chain.run(query)
61
  #print(result)
62
  bloglist.append(result)
63
 
 
43
  print(datetime.today().strftime("%d-%m-%Y"))
44
  if text_inp2!='':
45
  #openai.api_key = text_inp2
46
+ topic=text_inp1
47
  llm = OpenAI(temperature=0,openai_api_key=text_inp2)
48
 
49
  prompt_template = PromptTemplate(
50
+ input_variables=["query","topic"],
51
  template=template
52
  )
53
 
 
57
 
58
 
59
  llm_chain = LLMChain(prompt=prompt_template, llm=llm,verbose=True)
60
+ result=llm_chain.run(query,topic)
61
  #print(result)
62
  bloglist.append(result)
63