Upload folder using huggingface_hub
Browse files
.ipynb_checkpoints/test_gradio-checkpoint.py
CHANGED
@@ -29,7 +29,7 @@ def predict(message, history):
|
|
29 |
# history_langchain_format.append(AIMessage(content=ai))
|
30 |
# history_langchain_format.append(HumanMessage(content=message))
|
31 |
# gpt_response = llm(history_langchain_format)
|
32 |
-
response = llm_chain.invoke(message)
|
33 |
return response
|
34 |
|
35 |
gr.ChatInterface(predict).launch()
|
|
|
29 |
# history_langchain_format.append(AIMessage(content=ai))
|
30 |
# history_langchain_format.append(HumanMessage(content=message))
|
31 |
# gpt_response = llm(history_langchain_format)
|
32 |
+
response = llm_chain.invoke(message)['text']
|
33 |
return response
|
34 |
|
35 |
gr.ChatInterface(predict).launch()
|
test_gradio.py
CHANGED
@@ -29,7 +29,7 @@ def predict(message, history):
|
|
29 |
# history_langchain_format.append(AIMessage(content=ai))
|
30 |
# history_langchain_format.append(HumanMessage(content=message))
|
31 |
# gpt_response = llm(history_langchain_format)
|
32 |
-
response = llm_chain.invoke(message)
|
33 |
return response
|
34 |
|
35 |
gr.ChatInterface(predict).launch()
|
|
|
29 |
# history_langchain_format.append(AIMessage(content=ai))
|
30 |
# history_langchain_format.append(HumanMessage(content=message))
|
31 |
# gpt_response = llm(history_langchain_format)
|
32 |
+
response = llm_chain.invoke(message)['text']
|
33 |
return response
|
34 |
|
35 |
gr.ChatInterface(predict).launch()
|