lhoestq HF Staff commited on
Commit
85c95ca
·
verified ·
1 Parent(s): 7cc69a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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, {}, 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(
 
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(