Spaces:
Runtime error
Runtime error
Commit ·
59e8724
1
Parent(s): 505e687
Update main.py
Browse files
main.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
import uvicorn
|
| 2 |
from flask import Flask, request, jsonify
|
| 3 |
from langchain import PromptTemplate, LLMChain
|
| 4 |
from langchain.memory import StreamlitChatMessageHistory
|
|
@@ -56,5 +56,6 @@ def chat():
|
|
| 56 |
initial_response = llm_chain.run(user_query)
|
| 57 |
return jsonify({'response': initial_response})
|
| 58 |
|
| 59 |
-
|
| 60 |
-
# uvicorn.run(app, host='0.0.0.0', port=5000)
|
|
|
|
|
|
| 1 |
+
#import uvicorn
|
| 2 |
from flask import Flask, request, jsonify
|
| 3 |
from langchain import PromptTemplate, LLMChain
|
| 4 |
from langchain.memory import StreamlitChatMessageHistory
|
|
|
|
| 56 |
initial_response = llm_chain.run(user_query)
|
| 57 |
return jsonify({'response': initial_response})
|
| 58 |
|
| 59 |
+
if __name__ == "__main__":
|
| 60 |
+
# uvicorn.run(app, host='0.0.0.0', port=5000)
|
| 61 |
+
app.run(host='0.0.0.0')
|