Spaces:
Sleeping
Sleeping
modified
Browse files
app.py
CHANGED
@@ -73,20 +73,29 @@ def customLLMBot(user_input, uploaded_image):
|
|
73 |
return [(user_input or "Image uploaded", error_message)], None
|
74 |
|
75 |
|
|
|
76 |
# Gradio Interface
|
77 |
def chatbot_ui():
|
78 |
with gr.Blocks() as demo:
|
79 |
gr.Markdown("# Healthcare Chatbot Doctor")
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
|
91 |
# Define actions
|
92 |
submit_btn.click(
|
@@ -109,6 +118,7 @@ def chatbot_ui():
|
|
109 |
|
110 |
return demo
|
111 |
|
|
|
112 |
# Launch the interface
|
113 |
#chatbot_ui().launch(share=True)
|
114 |
chatbot_ui().launch(server_name="0.0.0.0", server_port=7860)
|
|
|
73 |
return [(user_input or "Image uploaded", error_message)], None
|
74 |
|
75 |
|
76 |
+
# Gradio Interface
|
77 |
# Gradio Interface
|
78 |
def chatbot_ui():
|
79 |
with gr.Blocks() as demo:
|
80 |
gr.Markdown("# Healthcare Chatbot Doctor")
|
81 |
|
82 |
+
with gr.Row():
|
83 |
+
# Left column: Chatbot and inputs
|
84 |
+
with gr.Column(scale=3): # Wider column
|
85 |
+
chatbot = gr.Chatbot(label="Responses")
|
86 |
+
user_input = gr.Textbox(
|
87 |
+
label="Ask a health-related question",
|
88 |
+
placeholder="Describe your symptoms...",
|
89 |
+
elem_id="user-input",
|
90 |
+
lines=1,
|
91 |
+
)
|
92 |
+
audio_output = gr.Audio(label="Audio Response")
|
93 |
+
submit_btn = gr.Button("Submit")
|
94 |
+
clear_btn = gr.Button("Clear")
|
95 |
+
|
96 |
+
# Right column: Upload image
|
97 |
+
with gr.Column(scale=1): # Narrower column
|
98 |
+
uploaded_image = gr.Image(label="Upload an Image", type="pil")
|
99 |
|
100 |
# Define actions
|
101 |
submit_btn.click(
|
|
|
118 |
|
119 |
return demo
|
120 |
|
121 |
+
|
122 |
# Launch the interface
|
123 |
#chatbot_ui().launch(share=True)
|
124 |
chatbot_ui().launch(server_name="0.0.0.0", server_port=7860)
|