jbilcke-hf HF Staff commited on
Commit
a4c1101
·
verified ·
1 Parent(s): c9ed4f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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'}