sandeepgiri908 commited on
Commit
a43d3d9
ยท
verified ยท
1 Parent(s): 925a8ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.lower())
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.Dropdown(["India", "Other"], label="Country"),
127
  gr.Textbox(label="State (if in India)")
128
  ],
129
  outputs=gr.Textbox(label="Output"),
130
- theme="soft"
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)