AlanRex commited on
Commit
b0116bc
·
verified ·
1 Parent(s): 18e83d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +44 -39
app.py CHANGED
@@ -329,7 +329,50 @@ app.layout = html.Div([
329
  'color': 'white',
330
  'margin-bottom': '40px'
331
  }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
332
 
 
 
333
  # 控制面板 (移除台指期選項)
334
  html.Div([
335
  html.Div([
@@ -483,18 +526,6 @@ app.layout = html.Div([
483
  'border': '1px solid #e9ecef'
484
  }),
485
 
486
- # 景氣燈號與 PMI 分析
487
- html.Div([
488
- html.H3("景氣燈號與 PMI 分析"),
489
- html.Div([
490
- html.Div([
491
- dcc.Graph(id='business-climate-chart')
492
- ], style={'width': '48%', 'display': 'inline-block'}),
493
- html.Div([
494
- dcc.Graph(id='pmi-chart')
495
- ], style={'width': '48%', 'display': 'inline-block', 'margin-left': '2%'})
496
- ])
497
- ], style={'margin-top': '30px'}),
498
 
499
  # ==============================================================================
500
  # ===== 修改後的多檔股票比較區域 =====
@@ -551,33 +582,7 @@ app.layout = html.Div([
551
  'box-shadow': '0 2px 10px rgba(0,0,0,0.1)'
552
  }),
553
 
554
- # 新聞情感分析區域(模擬)
555
- html.Div([
556
- html.H3("📰 市場情緒與新聞分析", style={'color': '#E74C3C', 'margin-bottom': '20px'}),
557
- html.Div([
558
- html.Div([
559
- html.H4("市場情緒指標", style={'color': '#8E44AD'}),
560
- html.Div(id='sentiment-gauge')
561
- ], style={'width': '48%', 'display': 'inline-block'}),
562
-
563
- html.Div([
564
- html.H4("關鍵新聞摘要", style={'color': '#27AE60'}),
565
- html.Div(id='news-summary', style={
566
- 'background': '#f8f9fa',
567
- 'padding': '15px',
568
- 'border-radius': '8px',
569
- 'max-height': '200px',
570
- 'overflow-y': 'auto'
571
- })
572
- ], style={'width': '48%', 'display': 'inline-block', 'margin-left': '4%'})
573
- ])
574
- ], style={
575
- 'margin-top': '30px',
576
- 'padding': '20px',
577
- 'background': 'white',
578
- 'border-radius': '10px',
579
- 'box-shadow': '0 2px 10px rgba(0,0,0,0.1)'
580
- })
581
  ])
582
 
583
  # 台指期獨立預測回調函數 (新版本)
 
329
  'color': 'white',
330
  'margin-bottom': '40px'
331
  }),
332
+
333
+ # 新聞情感分析區域(模擬)
334
+ html.Div([
335
+ html.H3("📰 市場情緒與新聞分析", style={'color': '#E74C3C', 'margin-bottom': '20px'}),
336
+ html.Div([
337
+ html.Div([
338
+ html.H4("市場情緒指標", style={'color': '#8E44AD'}),
339
+ html.Div(id='sentiment-gauge')
340
+ ], style={'width': '48%', 'display': 'inline-block'}),
341
+
342
+ html.Div([
343
+ html.H4("關鍵新聞摘要", style={'color': '#27AE60'}),
344
+ html.Div(id='news-summary', style={
345
+ 'background': '#f8f9fa',
346
+ 'padding': '15px',
347
+ 'border-radius': '8px',
348
+ 'max-height': '200px',
349
+ 'overflow-y': 'auto'
350
+ })
351
+ ], style={'width': '48%', 'display': 'inline-block', 'margin-left': '4%'})
352
+ ])
353
+ ], style={
354
+ 'margin-top': '30px',
355
+ 'padding': '20px',
356
+ 'background': 'white',
357
+ 'border-radius': '10px',
358
+ 'box-shadow': '0 2px 10px rgba(0,0,0,0.1)'
359
+ }),
360
+
361
+ # 景氣燈號與 PMI 分析
362
+ html.Div([
363
+ html.H3("景氣燈號與 PMI 分析"),
364
+ html.Div([
365
+ html.Div([
366
+ dcc.Graph(id='business-climate-chart')
367
+ ], style={'width': '48%', 'display': 'inline-block'}),
368
+ html.Div([
369
+ dcc.Graph(id='pmi-chart')
370
+ ], style={'width': '48%', 'display': 'inline-block', 'margin-left': '2%'})
371
+ ])
372
+ ], style={'margin-top': '30px'}),
373
 
374
+
375
+
376
  # 控制面板 (移除台指期選項)
377
  html.Div([
378
  html.Div([
 
526
  'border': '1px solid #e9ecef'
527
  }),
528
 
 
 
 
 
 
 
 
 
 
 
 
 
529
 
530
  # ==============================================================================
531
  # ===== 修改後的多檔股票比較區域 =====
 
582
  'box-shadow': '0 2px 10px rgba(0,0,0,0.1)'
583
  }),
584
 
585
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
586
  ])
587
 
588
  # 台指期獨立預測回調函數 (新版本)