Spaces:
Runtime error
Runtime error
Update main.py
Browse files
main.py
CHANGED
|
@@ -48,9 +48,8 @@ def home_api():
|
|
| 48 |
return {"Hey":"Flask Home API Deploy Success on HF"}
|
| 49 |
|
| 50 |
@app.route('/api/chat', methods=['POST'])
|
| 51 |
-
|
| 52 |
-
async def chat():
|
| 53 |
-
#不支持async
|
| 54 |
data = request.get_json()
|
| 55 |
user_query = data['user_question']
|
| 56 |
initial_response = llm_chain.run(user_query)
|
|
|
|
| 48 |
return {"Hey":"Flask Home API Deploy Success on HF"}
|
| 49 |
|
| 50 |
@app.route('/api/chat', methods=['POST'])
|
| 51 |
+
def chat():
|
| 52 |
+
#async def chat(): #Failed - Flask API 不支持async???
|
|
|
|
| 53 |
data = request.get_json()
|
| 54 |
user_query = data['user_question']
|
| 55 |
initial_response = llm_chain.run(user_query)
|