Update app.py
Browse files
app.py
CHANGED
|
@@ -73,7 +73,7 @@ def chat_head():
|
|
| 73 |
|
| 74 |
@app.get("/chat")
|
| 75 |
def chat_get(message: str = "", system_message: str = "You are a friendly Chatbot.", max_tokens: int = 512, temperature: float = 0.7, top_p: float = 0.95):
|
| 76 |
-
predict_response = requests.post('http://localhost:7860/call/chat', json={'data': [message,
|
| 77 |
if "event_id" not in predict_response:
|
| 78 |
return predict_response
|
| 79 |
return JSONResponse([json.loads(
|
|
|
|
| 73 |
|
| 74 |
@app.get("/chat")
|
| 75 |
def chat_get(message: str = "", system_message: str = "You are a friendly Chatbot.", max_tokens: int = 512, temperature: float = 0.7, top_p: float = 0.95):
|
| 76 |
+
predict_response = requests.post('http://localhost:7860/call/chat', json={'data': [message, [], system_message, max_tokens, temperature, top_p]}).json()
|
| 77 |
if "event_id" not in predict_response:
|
| 78 |
return predict_response
|
| 79 |
return JSONResponse([json.loads(
|