Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def chatbot_interface(user_message, country, state):
|
|
102 |
# Check for serious issues
|
103 |
if detect_serious_issue(user_message):
|
104 |
if country.lower() == "india":
|
105 |
-
doctors = get_psychiatrists_by_location(state
|
106 |
if doctors:
|
107 |
doc_info = "\n".join([f"๐ฅ {doc['name']}\n๐ {doc['hospital']}\n๐ {doc['specialization']}" for doc in doctors])
|
108 |
return f"Chatbot: {response}\n\n๐น Here are some psychiatrists in {state}:\n{doc_info}"
|
@@ -123,9 +123,9 @@ gr.Interface(
|
|
123 |
fn=chatbot_interface,
|
124 |
inputs=[
|
125 |
gr.Textbox(label="Enter your message"),
|
126 |
-
gr.
|
127 |
gr.Textbox(label="State (if in India)")
|
128 |
],
|
129 |
outputs=gr.Textbox(label="Output"),
|
130 |
-
theme="
|
131 |
).launch(share=True)
|
|
|
102 |
# Check for serious issues
|
103 |
if detect_serious_issue(user_message):
|
104 |
if country.lower() == "india":
|
105 |
+
doctors = get_psychiatrists_by_location(state)
|
106 |
if doctors:
|
107 |
doc_info = "\n".join([f"๐ฅ {doc['name']}\n๐ {doc['hospital']}\n๐ {doc['specialization']}" for doc in doctors])
|
108 |
return f"Chatbot: {response}\n\n๐น Here are some psychiatrists in {state}:\n{doc_info}"
|
|
|
123 |
fn=chatbot_interface,
|
124 |
inputs=[
|
125 |
gr.Textbox(label="Enter your message"),
|
126 |
+
gr.Textbox([label="Country"),
|
127 |
gr.Textbox(label="State (if in India)")
|
128 |
],
|
129 |
outputs=gr.Textbox(label="Output"),
|
130 |
+
theme="dark"
|
131 |
).launch(share=True)
|