Update app.py
Browse files
app.py
CHANGED
|
@@ -222,8 +222,10 @@ G_filtered = filter_graph(G, node_threshold=node_degree_threshold, edge_threshol
|
|
| 222 |
|
| 223 |
# Fetch rankings if student ID is provided
|
| 224 |
rankings = {}
|
| 225 |
-
|
| 226 |
-
|
|
|
|
|
|
|
| 227 |
content_ids = list(G_filtered.nodes)
|
| 228 |
rankings = get_rankings_from_api(selected_brand, int(student_id), content_ids)
|
| 229 |
if rankings:
|
|
|
|
| 222 |
|
| 223 |
# Fetch rankings if student ID is provided
|
| 224 |
rankings = {}
|
| 225 |
+
if not student_id:
|
| 226 |
+
student_id = 111111111111
|
| 227 |
+
# if there's no student ID, we'll just rank by popularity,
|
| 228 |
+
# i.e. each node will have a ring regardless of whether a student ID is provided
|
| 229 |
content_ids = list(G_filtered.nodes)
|
| 230 |
rankings = get_rankings_from_api(selected_brand, int(student_id), content_ids)
|
| 231 |
if rankings:
|