import gradio as gr from register_patient import gradio_interface as register_patient from view_appointments import gradio_interface as view_appointments from consult_doctor import gradio_interface as consult_doctor from add_reports import gradio_interface as add_reports from view_reports import gradio_interface as view_reports from connect_doctor import gradio_interface as connect_doctor def show_dashboard(role): if role == "Doctor": return gr.update(visible=True), gr.update(visible=False) else: return gr.update(visible=False), gr.update(visible=True) with gr.Blocks(theme=gr.themes.Soft(), css="body { background: #f0f4f8; }") as demo: gr.Markdown("## 🏥 Bolt Health App Dashboard") role = gr.Radio(choices=["Doctor", "Patient"], label="Select Role") doctor_area = gr.Column(visible=False) patient_area = gr.Column(visible=False) role.change(fn=show_dashboard, inputs=role, outputs=[doctor_area, patient_area]) with doctor_area: gr.Markdown("## 👨‍⚕️ Doctor Dashboard") view_appointments() consult_doctor() add_reports() with patient_area: gr.Markdown("## 🧑‍⚕️ Patient Dashboard") register_patient() view_reports() connect_doctor() demo.launch()