lhoestq HF staff commited on
Commit
f3dd017
1 Parent(s): f6b540b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -67,11 +67,11 @@ demo = gr.ChatInterface(
67
 
68
  app = FastAPI()
69
 
70
- @app.head("/chat")
71
  def chat_head():
72
  return StreamingResponse("", media_type="application/json")
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:
 
67
 
68
  app = FastAPI()
69
 
70
+ @app.head("/ask")
71
  def chat_head():
72
  return StreamingResponse("", media_type="application/json")
73
 
74
+ @app.get("/ask")
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: