Update app.py
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ def get_rankings_from_api(brand, user_id, content_ids):
|
|
| 65 |
try:
|
| 66 |
payload = {
|
| 67 |
"brand": brand.upper(),
|
| 68 |
-
"user_id": user_id,
|
| 69 |
"content_ids": content_ids
|
| 70 |
}
|
| 71 |
headers = {
|
|
@@ -224,7 +224,7 @@ G_filtered = filter_graph(G, node_threshold=node_degree_threshold, edge_threshol
|
|
| 224 |
rankings = {}
|
| 225 |
if student_id:
|
| 226 |
content_ids = list(G_filtered.nodes)
|
| 227 |
-
rankings = get_rankings_from_api(selected_brand, student_id, content_ids)
|
| 228 |
if rankings:
|
| 229 |
rankings = rankings['ranked_content_ids']
|
| 230 |
|
|
|
|
| 65 |
try:
|
| 66 |
payload = {
|
| 67 |
"brand": brand.upper(),
|
| 68 |
+
"user_id": int(user_id),
|
| 69 |
"content_ids": content_ids
|
| 70 |
}
|
| 71 |
headers = {
|
|
|
|
| 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 |
|