Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,7 +41,7 @@ def predict(request: gr.Request, *args, progress=gr.Progress(track_tqdm=True)):
|
|
| 41 |
userInfo = hf_api.whoami(token)
|
| 42 |
if not userInfo:
|
| 43 |
raise gr.Error("The provided API key is invalid!")
|
| 44 |
-
except:
|
| 45 |
raise gr.Error("The provider API key is invalid!")
|
| 46 |
|
| 47 |
headers = {'Content-Type': 'application/json'}
|
|
|
|
| 41 |
userInfo = hf_api.whoami(token)
|
| 42 |
if not userInfo:
|
| 43 |
raise gr.Error("The provided API key is invalid!")
|
| 44 |
+
except Exception as err:
|
| 45 |
raise gr.Error("The provider API key is invalid!")
|
| 46 |
|
| 47 |
headers = {'Content-Type': 'application/json'}
|