Update app.py
Browse files
app.py
CHANGED
|
@@ -222,14 +222,11 @@ G_filtered = filter_graph(G, node_threshold=node_degree_threshold, edge_threshol
|
|
| 222 |
|
| 223 |
# Fetch rankings if student ID is provided
|
| 224 |
rankings = {}
|
| 225 |
-
if
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
| 230 |
-
rankings = get_rankings_from_api(selected_brand, int(student_id), content_ids)
|
| 231 |
-
if rankings:
|
| 232 |
-
rankings = rankings['ranked_content_ids']
|
| 233 |
|
| 234 |
layers = st.slider("Depth to explore:", 1, 6, value=3)
|
| 235 |
top_k = st.slider("Branching factor (per node):", 1, 6, value=3)
|
|
|
|
| 222 |
|
| 223 |
# Fetch rankings if student ID is provided
|
| 224 |
rankings = {}
|
| 225 |
+
if student_id:
|
| 226 |
+
content_ids = list(G_filtered.nodes)
|
| 227 |
+
rankings = get_rankings_from_api(selected_brand, int(student_id), content_ids)
|
| 228 |
+
if rankings:
|
| 229 |
+
rankings = rankings['ranked_content_ids']
|
|
|
|
|
|
|
|
|
|
| 230 |
|
| 231 |
layers = st.slider("Depth to explore:", 1, 6, value=3)
|
| 232 |
top_k = st.slider("Branching factor (per node):", 1, 6, value=3)
|