yougandar commited on
Commit
aab9bca
·
verified ·
1 Parent(s): 1b38084

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +52 -23
app.py CHANGED
@@ -1,26 +1,55 @@
1
  import gradio as gr
2
 
3
- # Import the individual tab modules
4
- from register_patient import app as register_patient_app
5
- from book_appointment import app as book_appointment_app
6
- from consultation import app as consultation_app
7
- from view_consultations import app as view_consultations_app
8
- from view_appointments import app as view_appointments_app
9
- from add_patient_reports import app as add_patient_reports_app
10
- from view_patient_reports import app as view_patient_reports_app
11
- from connect_doctor import app as connect_doctor_app
12
-
13
- # Define the main app layout with tabs
14
- def main_app():
15
- with gr.Blocks() as app:
16
- gr.Tab("Register Patient").content(register_patient_app)
17
- gr.Tab("Book Appointment").content(book_appointment_app)
18
- gr.Tab("Consultation").content(consultation_app)
19
- gr.Tab("View Consultations").content(view_consultations_app)
20
- gr.Tab("View Appointments").content(view_appointments_app)
21
- gr.Tab("Add Patient Reports").content(add_patient_reports_app)
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
- main_app()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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()