Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,11 @@ st.title("USC GPT - Find the perfect class")
|
|
40 |
|
41 |
class_time = st.slider(
|
42 |
"Filter Class Times:",
|
43 |
-
value=(
|
|
|
|
|
|
|
|
|
44 |
|
45 |
units = st.slider(
|
46 |
"Number of units",
|
@@ -68,9 +72,11 @@ def get_rag_results(prompt):
|
|
68 |
|
69 |
##Get metadata filters
|
70 |
days_filter = list()
|
|
|
|
|
71 |
query_filter = {
|
72 |
-
"start": {"$gte":
|
73 |
-
"end": {"$lte":
|
74 |
}
|
75 |
|
76 |
if units != "any":
|
|
|
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(
|
50 |
"Number of units",
|
|
|
72 |
|
73 |
##Get metadata filters
|
74 |
days_filter = list()
|
75 |
+
start = float(class_time[0][0]) + float(class_time[0][1]) / 100.0
|
76 |
+
end = float(class_time[1][0]) + float(class_time[1][1]) / 100.0
|
77 |
query_filter = {
|
78 |
+
"start": {"$gte": start},
|
79 |
+
"end": {"$lte": end}
|
80 |
}
|
81 |
|
82 |
if units != "any":
|