Update app.py
Browse files
app.py
CHANGED
|
@@ -2,62 +2,55 @@ 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.create_gradio_interface()
|
| 34 |
|
| 35 |
with gr.Blocks() as app:
|
| 36 |
gr.Markdown("## Patient Management App")
|
| 37 |
-
|
| 38 |
-
with gr.Tab("Patient Management - Register"):
|
| 39 |
register_patient_page()
|
| 40 |
-
|
| 41 |
-
with gr.Tab("Patient Management - Book Appointment"):
|
| 42 |
book_appointment_page()
|
| 43 |
-
|
| 44 |
-
with gr.Tab("Patient Management - Consultation"):
|
| 45 |
consultation_page()
|
| 46 |
-
|
| 47 |
-
with gr.Tab("Patient Management - View Consultation"):
|
| 48 |
view_consultation_page()
|
| 49 |
-
|
| 50 |
-
with gr.Tab("Patient Management - View Appointments"):
|
| 51 |
view_appointments_page()
|
| 52 |
-
|
| 53 |
-
with gr.Tab("Doctor Management - Add Reports"):
|
| 54 |
add_reports_page()
|
| 55 |
-
|
| 56 |
-
with gr.Tab("Patient Management - View Reports"):
|
| 57 |
view_patient_reports_page()
|
| 58 |
-
|
| 59 |
-
with gr.Tab("Doctor Management - Connect"):
|
| 60 |
connect_doctor_page()
|
| 61 |
|
| 62 |
if __name__ == "__main__":
|
| 63 |
app.launch()
|
|
|
|
|
|
| 2 |
|
| 3 |
def register_patient_page():
|
| 4 |
import register_patient
|
| 5 |
+
return register_patient.create_gradio_interface() # Use gradio_interface
|
| 6 |
|
| 7 |
def book_appointment_page():
|
| 8 |
import book_appointment
|
| 9 |
+
return book_appointment.create_gradio_interface() # Use gradio_interface
|
| 10 |
|
| 11 |
def consultation_page():
|
| 12 |
import consultation
|
| 13 |
+
return consultation.gradio_interface() # Use gradio_interface
|
| 14 |
|
| 15 |
def view_consultation_page():
|
| 16 |
import view_consultation
|
| 17 |
+
return view_consultation.gradio_interface() # Use gradio_interface
|
| 18 |
|
| 19 |
def view_appointments_page():
|
| 20 |
import view_appointments
|
| 21 |
+
return view_appointments.gradio_interface() # Use gradio_interface
|
| 22 |
|
| 23 |
def add_reports_page():
|
| 24 |
import add_reports
|
| 25 |
+
return add_reports.gradio_interface() # Use gradio_interface
|
| 26 |
|
| 27 |
def view_patient_reports_page():
|
| 28 |
import view_patient_reports
|
| 29 |
+
return view_patient_reports.create_gradio_interface() # Use gradio_interface
|
| 30 |
|
| 31 |
def connect_doctor_page():
|
| 32 |
import connect_doctor
|
| 33 |
+
return connect_doctor.create_gradio_interface() # Use 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()
|
| 56 |
+
instead of doctor and patient under role replace names as doctor management and patient management
|