AlanRex commited on
Commit
8524a03
·
verified ·
1 Parent(s): aab9398

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -18,6 +18,17 @@ import requests
18
  # 引用您組員的預測器程式
19
  from Bert_predict import BertPredictor
20
 
 
 
 
 
 
 
 
 
 
 
 
21
  # 台股代號對應表 (移除台指期,因為它現在是獨立區塊)
22
  TAIWAN_STOCKS = {
23
  '元大台灣50': '0050.TW', # 新增
 
18
  # 引用您組員的預測器程式
19
  from Bert_predict import BertPredictor
20
 
21
+ # LINEAPI
22
+ from fastapi import APIRouter
23
+
24
+ router = APIRouter()
25
+
26
+ @router.get("/stocks")
27
+ def get_all_stocks():
28
+ return TAIWAN_STOCKS
29
+
30
+ app.include_router(router)
31
+
32
  # 台股代號對應表 (移除台指期,因為它現在是獨立區塊)
33
  TAIWAN_STOCKS = {
34
  '元大台灣50': '0050.TW', # 新增