Kathirsci commited on
Commit
526dcd3
·
verified ·
1 Parent(s): 59bdb30

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,9 +24,9 @@ QA_CHAIN_PROMPT = PromptTemplate(input_variables=["context", "question"],templat
24
 
25
  def predict(message, history):
26
  input_prompt = QA_CHAIN_PROMPT.format(question=message, context=history)
27
- ai_msg = llm.generate([input_prompt])[0] # Return only the first generation
 
28
  return ai_msg
29
 
30
 
31
-
32
  gr.ChatInterface(predict).launch()
 
24
 
25
  def predict(message, history):
26
  input_prompt = QA_CHAIN_PROMPT.format(question=message, context=history)
27
+ result = llm.generate([input_prompt])
28
+ ai_msg = result[0].generations[0].text
29
  return ai_msg
30
 
31
 
 
32
  gr.ChatInterface(predict).launch()