Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,26 +1,55 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
gr.Tab("View Patient Reports").content(view_patient_reports_app)
|
| 23 |
-
gr.Tab("Connect Doctor").content(connect_doctor_app)
|
| 24 |
-
app.launch()
|
| 25 |
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def register_patient_page():
|
| 4 |
+
import register_patient
|
| 5 |
+
return register_patient.create_gradio_interface()
|
| 6 |
+
|
| 7 |
+
def book_appointment_page():
|
| 8 |
+
import book_appointment
|
| 9 |
+
return book_appointment.create_gradio_interface()
|
| 10 |
+
|
| 11 |
+
def consultation_page():
|
| 12 |
+
import consultation
|
| 13 |
+
return consultation.gradio_interface()
|
| 14 |
+
|
| 15 |
+
def view_consultation_page():
|
| 16 |
+
import view_consultation
|
| 17 |
+
return view_consultation.gradio_interface()
|
| 18 |
+
|
| 19 |
+
def view_appointments_page():
|
| 20 |
+
import view_appointments
|
| 21 |
+
return view_appointments.gradio_interface()
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
def add_reports_page():
|
| 24 |
+
import add_reports
|
| 25 |
+
return add_reports.gradio_interface()
|
| 26 |
+
|
| 27 |
+
def view_patient_reports_page():
|
| 28 |
+
import view_patient_reports
|
| 29 |
+
return view_patient_reports.create_gradio_interface()
|
| 30 |
+
|
| 31 |
+
def connect_doctor_page():
|
| 32 |
+
import connect_doctor
|
| 33 |
+
return connect_doctor.gradio_interface()
|
| 34 |
+
|
| 35 |
+
with gr.Blocks() as app:
|
| 36 |
+
gr.Markdown("## Patient Management App")
|
| 37 |
+
with gr.Tab("Register Patient"):
|
| 38 |
+
register_patient_page()
|
| 39 |
+
with gr.Tab("Book Appointment"):
|
| 40 |
+
book_appointment_page()
|
| 41 |
+
with gr.Tab("Consultation"):
|
| 42 |
+
consultation_page()
|
| 43 |
+
with gr.Tab("View Consultation"):
|
| 44 |
+
view_consultation_page()
|
| 45 |
+
with gr.Tab("View Appointments"):
|
| 46 |
+
view_appointments_page()
|
| 47 |
+
with gr.Tab("Add Reports"):
|
| 48 |
+
add_reports_page()
|
| 49 |
+
with gr.Tab("View Patient Reports"):
|
| 50 |
+
view_patient_reports_page()
|
| 51 |
+
with gr.Tab("Connect Doctor"):
|
| 52 |
+
connect_doctor_page()
|
| 53 |
+
|
| 54 |
+
if __name__ == "__main__":
|
| 55 |
+
app.launch()
|