Update app.py
Browse files
app.py
CHANGED
|
@@ -666,8 +666,9 @@ with gr.Blocks(theme=theme, title="Hospital Queue Management System") as demo:
|
|
| 666 |
lines=3
|
| 667 |
)
|
| 668 |
|
|
|
|
| 669 |
doctor = gr.Dropdown(
|
| 670 |
-
choices=get_doctor_names,
|
| 671 |
label="Select Doctor*",
|
| 672 |
info="Only shows available doctors"
|
| 673 |
)
|
|
@@ -701,8 +702,9 @@ with gr.Blocks(theme=theme, title="Hospital Queue Management System") as demo:
|
|
| 701 |
gr.Markdown("### Manage Patient Queue")
|
| 702 |
|
| 703 |
with gr.Row():
|
|
|
|
| 704 |
doc_select = gr.Dropdown(
|
| 705 |
-
choices=get_all_doctor_names,
|
| 706 |
label="Select Doctor",
|
| 707 |
info="Select doctor to view their queue"
|
| 708 |
)
|
|
@@ -758,8 +760,9 @@ with gr.Blocks(theme=theme, title="Hospital Queue Management System") as demo:
|
|
| 758 |
|
| 759 |
with gr.Row():
|
| 760 |
appt_email = gr.Textbox(label="Email (Optional)", placeholder="Enter email address")
|
|
|
|
| 761 |
appt_doctor = gr.Dropdown(
|
| 762 |
-
choices=get_all_doctor_names,
|
| 763 |
label="Select Doctor*"
|
| 764 |
)
|
| 765 |
|
|
@@ -791,8 +794,7 @@ with gr.Blocks(theme=theme, title="Hospital Queue Management System") as demo:
|
|
| 791 |
fn=schedule_appointment,
|
| 792 |
inputs=[appt_name, appt_phone, appt_email, appt_doctor, appt_date, appt_time, appt_reason],
|
| 793 |
outputs=schedule_output
|
| 794 |
-
)
|
| 795 |
-
|
| 796 |
# Appointment List
|
| 797 |
gr.Markdown("### View Appointments")
|
| 798 |
|
|
|
|
| 666 |
lines=3
|
| 667 |
)
|
| 668 |
|
| 669 |
+
# Fixed dropdown: Use the actual list rather than the function
|
| 670 |
doctor = gr.Dropdown(
|
| 671 |
+
choices=get_doctor_names(), # Call the function to get its return value
|
| 672 |
label="Select Doctor*",
|
| 673 |
info="Only shows available doctors"
|
| 674 |
)
|
|
|
|
| 702 |
gr.Markdown("### Manage Patient Queue")
|
| 703 |
|
| 704 |
with gr.Row():
|
| 705 |
+
# Fixed dropdown: Use the actual list rather than the function
|
| 706 |
doc_select = gr.Dropdown(
|
| 707 |
+
choices=get_all_doctor_names(), # Call the function to get its return value
|
| 708 |
label="Select Doctor",
|
| 709 |
info="Select doctor to view their queue"
|
| 710 |
)
|
|
|
|
| 760 |
|
| 761 |
with gr.Row():
|
| 762 |
appt_email = gr.Textbox(label="Email (Optional)", placeholder="Enter email address")
|
| 763 |
+
# Fixed dropdown: Use the actual list rather than the function
|
| 764 |
appt_doctor = gr.Dropdown(
|
| 765 |
+
choices=get_all_doctor_names(), # Call the function to get its return value
|
| 766 |
label="Select Doctor*"
|
| 767 |
)
|
| 768 |
|
|
|
|
| 794 |
fn=schedule_appointment,
|
| 795 |
inputs=[appt_name, appt_phone, appt_email, appt_doctor, appt_date, appt_time, appt_reason],
|
| 796 |
outputs=schedule_output
|
| 797 |
+
)
|
|
|
|
| 798 |
# Appointment List
|
| 799 |
gr.Markdown("### View Appointments")
|
| 800 |
|