Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import os
|
|
| 6 |
API_URL = "https://api-inference.huggingface.co/models/cardiffnlp/twitter-xlm-roberta-base-sentiment"
|
| 7 |
|
| 8 |
# 從環境變數讀取 API 金鑰(建議這樣做以保護隱私)
|
| 9 |
-
HF_API_KEY = os.getenv("
|
| 10 |
HEADERS = {"Authorization": f"Bearer {analyze_sentiment_key}"}
|
| 11 |
|
| 12 |
# 轉換英文分類為中文
|
|
|
|
| 6 |
API_URL = "https://api-inference.huggingface.co/models/cardiffnlp/twitter-xlm-roberta-base-sentiment"
|
| 7 |
|
| 8 |
# 從環境變數讀取 API 金鑰(建議這樣做以保護隱私)
|
| 9 |
+
HF_API_KEY = os.getenv("analyze_sentiment_key") # 你可以在 .bashrc 或 .zshrc 設定環境變數
|
| 10 |
HEADERS = {"Authorization": f"Bearer {analyze_sentiment_key}"}
|
| 11 |
|
| 12 |
# 轉換英文分類為中文
|