Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,9 @@ 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 |
-
|
|
|
|
|
45 |
headers = {'Content-Type': 'application/json'}
|
46 |
|
47 |
payload = {"input": {}}
|
|
|
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'}
|
48 |
|
49 |
payload = {"input": {}}
|