yougandar commited on
Commit
7d77636
·
verified ·
1 Parent(s): b26a4f5

Create view_appointments.py

Browse files
Files changed (1) hide show
  1. view_appointments.py +19 -0
view_appointments.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import pandas as pd
3
+
4
+ # Hard-coded file path for appointment data
5
+ appointment_file_path = "appointments.csv"
6
+
7
+ # Function to view appointments
8
+ def view_appointments():
9
+ df = pd.read_csv(appointment_file_path)
10
+ return df
11
+
12
+ app = gr.Blocks()
13
+
14
+ with app:
15
+ with gr.Tab("View Appointments"):
16
+ appointments_data = gr.DataFrame(headers=["Patient ID", "Patient Name", "Speciality", "Doctor Name", "Date", "Time"])
17
+ gr.Button("Load Appointments").click(view_appointments, outputs=appointments_data)
18
+
19
+ app.launch()