Spaces:
Runtime error
Runtime error
trying now
Browse files
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 |
-
|
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 |
|