datamatters24 commited on
Commit
9a33c82
·
verified ·
1 Parent(s): d3fdff9

Upload web/src/controllers/DashboardController.php with huggingface_hub

Browse files
web/src/controllers/DashboardController.php CHANGED
@@ -53,6 +53,15 @@ class DashboardController
53
  }
54
  } catch (\PDOException $e) {}
55
 
 
 
 
 
 
 
 
 
 
56
  // Stamp distribution
57
  $stamps = [];
58
  try {
 
53
  }
54
  } catch (\PDOException $e) {}
55
 
56
+ // Sentiment summary
57
+ $sentimentSummary = [];
58
+ try {
59
+ $row = $db->fetchAll("SELECT value FROM analytics_cache WHERE key = 'sentiment_summary'");
60
+ if (!empty($row[0]['value'])) {
61
+ $sentimentSummary = json_decode($row[0]['value'], true) ?: [];
62
+ }
63
+ } catch (\PDOException $e) {}
64
+
65
  // Stamp distribution
66
  $stamps = [];
67
  try {