Spaces:
Runtime error
Runtime error
please work
Browse files- functions.py +3 -6
functions.py
CHANGED
@@ -152,13 +152,10 @@ def commit(repo, pr_number=None, message="Adding Evaluation Results", oauth_toke
|
|
152 |
finished_models = get_datas(data)
|
153 |
df = pd.DataFrame(finished_models)
|
154 |
|
155 |
-
if oauth_token
|
156 |
-
gr.Warning("You are not logged in
|
157 |
-
token = BOT_HF_TOKEN
|
158 |
-
elif oauth_token.expires_at < time.time():
|
159 |
-
raise gr.Error("Token expired. Logout and try again.")
|
160 |
else:
|
161 |
-
token = oauth_token
|
162 |
|
163 |
if repo.startswith("https://huggingface.co/"):
|
164 |
try:
|
|
|
152 |
finished_models = get_datas(data)
|
153 |
df = pd.DataFrame(finished_models)
|
154 |
|
155 |
+
if not oauth_token:
|
156 |
+
raise gr.Warning("You are not logged in. Click on 'Sign in with Huggingface' to log in.")
|
|
|
|
|
|
|
157 |
else:
|
158 |
+
token = oauth_token
|
159 |
|
160 |
if repo.startswith("https://huggingface.co/"):
|
161 |
try:
|