pyschopoodle commited on
Commit
71cd13b
·
verified ·
1 Parent(s): 3a6c53d

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -59
app.py DELETED
@@ -1,59 +0,0 @@
1
- # app.py
2
- import streamlit as st
3
- from app.database import init_db
4
- from app.appointment_system import AppointmentSystem
5
- from app.config import GROQ_API_KEY, DATABASE_PATH, CHROMA_PATH
6
-
7
- # Initialize the database and appointment system
8
- init_db()
9
- appointment_system = AppointmentSystem(
10
- db_path=DATABASE_PATH,
11
- chroma_path=CHROMA_PATH,
12
- groq_api_key=GROQ_API_KEY
13
- )
14
-
15
- # Streamlit App
16
- st.title("Appointment Booking System")
17
-
18
- # Input fields for booking an appointment
19
- st.header("Book an Appointment")
20
- date = st.date_input("Select Date")
21
- time = st.time_input("Select Time")
22
- user_id = st.text_input("User ID")
23
- description = st.text_area("Description")
24
-
25
- # Book appointment button
26
- if st.button("Book Appointment"):
27
- if not date or not time or not user_id or not description:
28
- st.error("Please fill in all fields.")
29
- else:
30
- result = appointment_system.book_appointment(
31
- date=str(date),
32
- time=str(time),
33
- user_id=user_id,
34
- description=description
35
- )
36
- if result["success"]:
37
- st.success(result["message"])
38
- else:
39
- st.error(result["message"])
40
-
41
- # Find similar appointments
42
- st.header("Find Similar Appointments")
43
- query = st.text_input("Enter a query to find similar appointments")
44
- if st.button("Search"):
45
- if not query:
46
- st.error("Please enter a query.")
47
- else:
48
- results = appointment_system.find_similar_appointments(query)
49
- st.write(results)
50
-
51
- # Get appointment suggestions using Groq
52
- st.header("Get Appointment Suggestions")
53
- user_query = st.text_input("Enter your query for suggestions")
54
- if st.button("Get Suggestions"):
55
- if not user_query:
56
- st.error("Please enter a query.")
57
- else:
58
- suggestions = appointment_system.get_appointment_suggestions(user_query)
59
- st.write(suggestions)