nivakaran commited on
Commit
18a2dbe
·
verified ·
1 Parent(s): eb6b502

Upload folder using huggingface_hub

Browse files
frontend/app/components/dashboard/StockPredictions.tsx CHANGED
@@ -28,13 +28,13 @@ const StockPredictions = () => {
28
  event.summary.toLowerCase().includes('negative');
29
 
30
  return {
31
- id: event.id || `market-${Math.random().toString(36).substr(2, 9)}`,
32
  title: event.summary,
33
  sentiment: isBullish ? 'bullish' : isBearish ? 'bearish' : 'neutral',
34
  confidence: event.confidence || 0.7,
35
  severity: event.severity,
36
  timestamp: event.timestamp,
37
- source: event.source_tool || 'Market Analysis'
38
  };
39
  });
40
 
@@ -69,8 +69,8 @@ const StockPredictions = () => {
69
  animate={{ opacity: 1, x: 0 }}
70
  transition={{ delay: idx * 0.05 }}
71
  className={`p-4 rounded-lg border-l-4 ${insight.sentiment === 'bullish' ? 'border-l-success bg-success/10' :
72
- insight.sentiment === 'bearish' ? 'border-l-destructive bg-destructive/10' :
73
- 'border-l-muted bg-muted/30'
74
  }`}
75
  >
76
  <div className="flex items-center gap-2 mb-2">
@@ -78,8 +78,8 @@ const StockPredictions = () => {
78
  {insight.sentiment === 'bearish' && <TrendingDown className="w-4 h-4 text-destructive" />}
79
  {insight.sentiment === 'neutral' && <Activity className="w-4 h-4 text-muted-foreground" />}
80
  <Badge className={`text-xs ${insight.sentiment === 'bullish' ? 'bg-success/20 text-success' :
81
- insight.sentiment === 'bearish' ? 'bg-destructive/20 text-destructive' :
82
- 'bg-muted'
83
  }`}>
84
  {insight.sentiment.toUpperCase()}
85
  </Badge>
 
28
  event.summary.toLowerCase().includes('negative');
29
 
30
  return {
31
+ id: event.event_id || `market-${Math.random().toString(36).substr(2, 9)}`,
32
  title: event.summary,
33
  sentiment: isBullish ? 'bullish' : isBearish ? 'bearish' : 'neutral',
34
  confidence: event.confidence || 0.7,
35
  severity: event.severity,
36
  timestamp: event.timestamp,
37
+ source: event.domain || 'Market Analysis'
38
  };
39
  });
40
 
 
69
  animate={{ opacity: 1, x: 0 }}
70
  transition={{ delay: idx * 0.05 }}
71
  className={`p-4 rounded-lg border-l-4 ${insight.sentiment === 'bullish' ? 'border-l-success bg-success/10' :
72
+ insight.sentiment === 'bearish' ? 'border-l-destructive bg-destructive/10' :
73
+ 'border-l-muted bg-muted/30'
74
  }`}
75
  >
76
  <div className="flex items-center gap-2 mb-2">
 
78
  {insight.sentiment === 'bearish' && <TrendingDown className="w-4 h-4 text-destructive" />}
79
  {insight.sentiment === 'neutral' && <Activity className="w-4 h-4 text-muted-foreground" />}
80
  <Badge className={`text-xs ${insight.sentiment === 'bullish' ? 'bg-success/20 text-success' :
81
+ insight.sentiment === 'bearish' ? 'bg-destructive/20 text-destructive' :
82
+ 'bg-muted'
83
  }`}>
84
  {insight.sentiment.toUpperCase()}
85
  </Badge>