Reshmarb commited on
Commit
b201041
·
1 Parent(s): 7b244cd
Files changed (1) hide show
  1. app.py +12 -14
app.py CHANGED
@@ -78,22 +78,21 @@ def chatbot_ui():
78
  with gr.Blocks() as demo:
79
  gr.Markdown("# Healthcare Chatbot Doctor")
80
 
81
- # Layout structure
82
  with gr.Row():
83
- with gr.Column(scale=3):
84
- chatbot = gr.Chatbot(label="Responses")
85
- with gr.Column(scale=1):
 
 
 
 
 
 
86
  uploaded_image = gr.Image(label="Upload an Image", type="pil")
87
- audio_output = gr.Audio(label="Audio Response")
88
  submit_btn = gr.Button("Submit")
89
  clear_btn = gr.Button("Clear")
90
-
91
- user_input = gr.Textbox(
92
- label="Ask a health-related question",
93
- placeholder="Describe your symptoms...",
94
- elem_id="user-input",
95
- lines=1
96
- )
97
 
98
  # Define actions
99
  submit_btn.click(
@@ -119,10 +118,9 @@ def chatbot_ui():
119
  return demo
120
 
121
 
122
-
123
  # Launch the interface
124
- #chatbot_ui().launch(share=True)
125
  chatbot_ui().launch(server_name="0.0.0.0", server_port=7860)
126
 
127
 
 
128
  #chatbot_ui().launch(server_name="localhost", server_port=7860)
 
78
  with gr.Blocks() as demo:
79
  gr.Markdown("# Healthcare Chatbot Doctor")
80
 
81
+ # Layout for chatbot and input box alignment
82
  with gr.Row():
83
+ with gr.Column(scale=3): # Main column for chatbot
84
+ chatbot = gr.Chatbot(label="Responses", elem_id="chatbot")
85
+ user_input = gr.Textbox(
86
+ label="Ask a health-related question",
87
+ placeholder="Describe your symptoms...",
88
+ elem_id="user-input",
89
+ lines=1,
90
+ )
91
+ with gr.Column(scale=1): # Side column for image and buttons
92
  uploaded_image = gr.Image(label="Upload an Image", type="pil")
 
93
  submit_btn = gr.Button("Submit")
94
  clear_btn = gr.Button("Clear")
95
+ audio_output = gr.Audio(label="Audio Response")
 
 
 
 
 
 
96
 
97
  # Define actions
98
  submit_btn.click(
 
118
  return demo
119
 
120
 
 
121
  # Launch the interface
 
122
  chatbot_ui().launch(server_name="0.0.0.0", server_port=7860)
123
 
124
 
125
+
126
  #chatbot_ui().launch(server_name="localhost", server_port=7860)