Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,6 +5,7 @@ import string
|
|
| 5 |
import tempfile
|
| 6 |
import time
|
| 7 |
import gradio as gr
|
|
|
|
| 8 |
import threading
|
| 9 |
from concurrent.futures import ThreadPoolExecutor
|
| 10 |
from typing import Iterable, List
|
|
@@ -129,15 +130,12 @@ def run_merge():
|
|
| 129 |
|
| 130 |
# Показываем информацию о токене
|
| 131 |
if USER_HF_TOKEN:
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
print(f"❌ No tokens found in environment variables")
|
| 139 |
-
print(f" Please set HF_TOKEN or COMMUNITY_HF_TOKEN")
|
| 140 |
-
return
|
| 141 |
|
| 142 |
print(f"📦 Repository: {REPO_NAME}")
|
| 143 |
print("=" * 50)
|
|
|
|
| 5 |
import tempfile
|
| 6 |
import time
|
| 7 |
import gradio as gr
|
| 8 |
+
print(f"Debug: HF_TOKEN exists = {os.getenv('HF_TOKEN') is not None}")
|
| 9 |
import threading
|
| 10 |
from concurrent.futures import ThreadPoolExecutor
|
| 11 |
from typing import Iterable, List
|
|
|
|
| 130 |
|
| 131 |
# Показываем информацию о токене
|
| 132 |
if USER_HF_TOKEN:
|
| 133 |
+
print(f"✅ Using user token from HF_TOKEN environment variable")
|
| 134 |
+
token_to_use = USER_HF_TOKEN
|
| 135 |
+
else:
|
| 136 |
+
print(f"❌ HF_TOKEN not found in environment variables")
|
| 137 |
+
print(f" Please set HF_TOKEN in Settings → Variables and secrets")
|
| 138 |
+
return
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
print(f"📦 Repository: {REPO_NAME}")
|
| 141 |
print("=" * 50)
|