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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -46
app.py CHANGED
@@ -330,50 +330,6 @@ app.layout = html.Div([
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
-
362
- # 景氣燈號與 PMI 分析
363
- html.Div([
364
- html.H3("景氣燈號與 PMI 分析"),
365
- html.Div([
366
- html.Div([
367
- dcc.Graph(id='business-climate-chart')
368
- ], style={'width': '48%', 'display': 'inline-block'}),
369
- html.Div([
370
- dcc.Graph(id='pmi-chart')
371
- ], style={'width': '48%', 'display': 'inline-block', 'margin-left': '2%'})
372
- ])
373
- ], style={'margin-top': '30px'}),
374
-
375
-
376
-
377
  # 控制面板 (移除台指期選項)
378
  html.Div([
379
  html.Div([
@@ -527,7 +483,18 @@ app.layout = html.Div([
527
  'border': '1px solid #e9ecef'
528
  }),
529
 
530
-
 
 
 
 
 
 
 
 
 
 
 
531
 
532
  # ==============================================================================
533
  # ===== 修改後的多檔股票比較區域 =====
@@ -584,7 +551,34 @@ app.layout = html.Div([
584
  'box-shadow': '0 2px 10px rgba(0,0,0,0.1)'
585
  }),
586
 
587
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
588
 
589
  # 台指期獨立預測回調函數 (新版本)
590
  @app.callback(
 
330
  'margin-bottom': '40px'
331
  }),
332
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
333
  # 控制面板 (移除台指期選項)
334
  html.Div([
335
  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
  '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
  # 台指期獨立預測回調函數 (新版本)
584
  @app.callback(