Update app.py
Browse files
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 |
-
|
|
|
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()
|