Update app.py
Browse files
app.py
CHANGED
|
@@ -51,6 +51,15 @@ FLORENCE_QUESTION = (
|
|
| 51 |
"Answer yes or no only."
|
| 52 |
)
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
MODEL_DATA = {}
|
| 55 |
MODEL_STATUS = {"status": "loading", "message": "ุฌุงุฑู ุชุญู
ูู ุงููู
ุงุฐุฌ..."}
|
| 56 |
|
|
|
|
| 51 |
"Answer yes or no only."
|
| 52 |
)
|
| 53 |
|
| 54 |
+
# โโโ ุชุณุฌูู ุงูุฏุฎูู ูู HuggingFace โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
| 55 |
+
HF_TOKEN = os.environ.get("HF_TOKEN", None)
|
| 56 |
+
if HF_TOKEN:
|
| 57 |
+
from huggingface_hub import login
|
| 58 |
+
login(token=HF_TOKEN)
|
| 59 |
+
print("โ
HuggingFace login successful", flush=True)
|
| 60 |
+
else:
|
| 61 |
+
print("โ ๏ธ HF_TOKEN not set - may hit rate limits", flush=True)
|
| 62 |
+
|
| 63 |
MODEL_DATA = {}
|
| 64 |
MODEL_STATUS = {"status": "loading", "message": "ุฌุงุฑู ุชุญู
ูู ุงููู
ุงุฐุฌ..."}
|
| 65 |
|