AAA1988 commited on
Commit
123fe34
·
verified ·
1 Parent(s): 73a69a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -8
app.py CHANGED
@@ -71,13 +71,15 @@ async def respond(message, history, system_message):
71
  yield f"Error: {str(e)}"
72
 
73
  # ------ Gradio Interface ------
74
- demo = gr.ChatInterface(
75
- respond,
76
- additional_inputs=[
77
- gr.Textbox(value="Medical diagnosis assistant", label="System Role")
78
- ],
79
- examples=[["I have a headache and fever"]] # Example query for guidance
80
- )
 
 
81
 
82
  if __name__ == "__main__":
83
- demo.launch()
 
71
  yield f"Error: {str(e)}"
72
 
73
  # ------ Gradio Interface ------
74
+ with gr.Blocks() as demo:
75
+ gr.Markdown("# Medical Diagnosis Assistant")
76
+ chatbot = gr.ChatInterface(
77
+ respond,
78
+ additional_inputs=[
79
+ gr.Textbox(value="Medical diagnosis assistant", label="System Role")
80
+ ],
81
+ examples=[["I have a headache and fever"]] # Example query for guidance
82
+ )
83
 
84
  if __name__ == "__main__":
85
+ demo.launch(max_threads=10, concurrency_limit=5)