Cyantist8208 commited on
Commit
47ba08b
·
1 Parent(s): 1df57d1
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -271,4 +271,8 @@ with gr.Blocks() as demo:
271
  )
272
 
273
  # ---------- 3. FastAPI layer --------------------------------------------------
 
 
 
 
274
  demo.launch(show_api=True, share=True)
 
271
  )
272
 
273
  # ---------- 3. FastAPI layer --------------------------------------------------
274
+ @gr.on_api()
275
+ def api_answer(system_prompt, context, question, user_id, history_flag, temp, top_p, top_k):
276
+ return answer(system_prompt, context, question, user_id, history_flag, temp, top_p, top_k)
277
+
278
  demo.launch(show_api=True, share=True)