Update app.py
Browse files
app.py
CHANGED
@@ -40,10 +40,7 @@ st.title("USC GPT - Find the perfect class")
|
|
40 |
|
41 |
class_time = st.slider(
|
42 |
"Filter Class Times:",
|
43 |
-
value=((11, 30), (12, 45))
|
44 |
-
min_value=(0, 0),
|
45 |
-
max_value=(23, 59),
|
46 |
-
step=(1, 15),
|
47 |
)
|
48 |
|
49 |
units = st.slider(
|
@@ -58,7 +55,7 @@ days = st.multiselect("What days are you free?",
|
|
58 |
)
|
59 |
|
60 |
assistant = st.chat_message("assistant")
|
61 |
-
initial_message = "How can I
|
62 |
|
63 |
|
64 |
|
@@ -72,8 +69,8 @@ def get_rag_results(prompt):
|
|
72 |
|
73 |
##Get metadata filters
|
74 |
days_filter = list()
|
75 |
-
start = float(class_time[0]
|
76 |
-
end = float(class_time[1]
|
77 |
query_filter = {
|
78 |
"start": {"$gte": start},
|
79 |
"end": {"$lte": end}
|
|
|
40 |
|
41 |
class_time = st.slider(
|
42 |
"Filter Class Times:",
|
43 |
+
value=(t(11, 30), t(12, 45))
|
|
|
|
|
|
|
44 |
)
|
45 |
|
46 |
units = st.slider(
|
|
|
55 |
)
|
56 |
|
57 |
assistant = st.chat_message("assistant")
|
58 |
+
initial_message = "Hello, I am your GPT-powered USC Class Helper! How can I assist you today?"
|
59 |
|
60 |
|
61 |
|
|
|
69 |
|
70 |
##Get metadata filters
|
71 |
days_filter = list()
|
72 |
+
start = float(class_time[0].hour) + float(class_time[0].minute) / 100.0
|
73 |
+
end = float(class_time[1].hour) + float(class_time[1].minute) / 100.0
|
74 |
query_filter = {
|
75 |
"start": {"$gte": start},
|
76 |
"end": {"$lte": end}
|