Andrewstivan commited on
Commit
335d88f
·
verified ·
1 Parent(s): 7023cc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -9
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
- print(f"✅ Using user token from HF_TOKEN environment variable")
133
- token_to_use = USER_HF_TOKEN
134
- elif COMMUNITY_HF_TOKEN:
135
- print(f"⚠️ No user token found, using community token from COMMUNITY_HF_TOKEN")
136
- token_to_use = None # None означает, что будет использован COMMUNITY_HF_TOKEN внутри функции merge
137
- else:
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)