Weyaxi commited on
Commit
5062189
1 Parent(s): 89c0f20

trying now

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -64,13 +64,13 @@ with gr.Blocks() as demo:
64
 
65
  submit_btn = gr.Button("Submit", variant="primary")
66
 
67
- def validate_model_id(input_id):
68
  if "mattshumer/" in input_id:
69
  gr.Error("DON'T, DON'T SPAM THAT MODELS")
70
  return "DON'T, DON'T SPAM THAT MODELS"
71
  else:
72
- #return gr.OAuthToken
73
- return commit(input_id)
74
 
75
  submit_btn.click(validate_model_id, model_id, output)
76
 
 
64
 
65
  submit_btn = gr.Button("Submit", variant="primary")
66
 
67
+ def validate_model_id(input_id, oauth_token: gr.OAuthToken):
68
  if "mattshumer/" in input_id:
69
  gr.Error("DON'T, DON'T SPAM THAT MODELS")
70
  return "DON'T, DON'T SPAM THAT MODELS"
71
  else:
72
+ return oauth_token.token
73
+ #return commit(input_id)
74
 
75
  submit_btn.click(validate_model_id, model_id, output)
76