Spaces:
Running
Running
Update mentions_dashboard.py
Browse files- mentions_dashboard.py +7 -1
mentions_dashboard.py
CHANGED
@@ -8,6 +8,11 @@ from transformers import pipeline
|
|
8 |
|
9 |
from sessions import create_session
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
# Load transformer-based sentiment model globally
|
12 |
sentiment_pipeline = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
|
13 |
|
@@ -68,7 +73,8 @@ def generate_mentions_dashboard(comm_client_id, comm_token_dict):
|
|
68 |
mention_shares = [e.get("generatedActivity") for e in all_notifications if e.get("action") == "SHARE_MENTION"]
|
69 |
mention_data = []
|
70 |
|
71 |
-
|
|
|
72 |
|
73 |
|
74 |
for share_urn in mention_shares:
|
|
|
8 |
|
9 |
from sessions import create_session
|
10 |
|
11 |
+
import logging
|
12 |
+
|
13 |
+
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
|
14 |
+
|
15 |
+
|
16 |
# Load transformer-based sentiment model globally
|
17 |
sentiment_pipeline = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
|
18 |
|
|
|
73 |
mention_shares = [e.get("generatedActivity") for e in all_notifications if e.get("action") == "SHARE_MENTION"]
|
74 |
mention_data = []
|
75 |
|
76 |
+
logging.info(f"Fetched {len(all_notifications)} total notifications.")
|
77 |
+
|
78 |
|
79 |
|
80 |
for share_urn in mention_shares:
|