Adam Jirkovsky
commited on
Commit
·
a482046
1
Parent(s):
434df7b
Captcha update
Browse files
app.py
CHANGED
@@ -341,47 +341,47 @@ with demo:
|
|
341 |
interactive=True,
|
342 |
)
|
343 |
"""
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
)
|
353 |
-
weight_type = gr.Dropdown(
|
354 |
-
choices=[i.value.name for i in WeightType],
|
355 |
-
label="Weights type",
|
356 |
-
multiselect=False,
|
357 |
-
value="Original",
|
358 |
-
interactive=True,
|
359 |
-
)
|
360 |
-
base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
|
361 |
-
"""
|
362 |
-
|
363 |
-
image, text = generate_captcha()
|
364 |
-
captcha_img = gr.Image(
|
365 |
-
image,
|
366 |
-
container=False,
|
367 |
-
show_download_button=False,
|
368 |
-
show_fullscreen_button=False,
|
369 |
-
show_share_button=False,
|
370 |
)
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
model_name_textbox,
|
378 |
-
upload_button,
|
379 |
-
precision,
|
380 |
-
hf_model_id,
|
381 |
-
contact_email
|
382 |
-
],
|
383 |
-
outputs = [submission_result, model_name_textbox, precision, hf_model_id, contact_email],
|
384 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
|
386 |
with gr.Row():
|
387 |
with gr.Accordion("📙 Citation", open=False):
|
|
|
341 |
interactive=True,
|
342 |
)
|
343 |
"""
|
344 |
+
"""
|
345 |
+
with gr.Column():
|
346 |
+
precision = gr.Dropdown(
|
347 |
+
choices=[i.value.name for i in Precision if i != Precision.Unknown],
|
348 |
+
label="Precision",
|
349 |
+
multiselect=False,
|
350 |
+
value="float16",
|
351 |
+
interactive=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
352 |
)
|
353 |
+
weight_type = gr.Dropdown(
|
354 |
+
choices=[i.value.name for i in WeightType],
|
355 |
+
label="Weights type",
|
356 |
+
multiselect=False,
|
357 |
+
value="Original",
|
358 |
+
interactive=True,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
)
|
360 |
+
base_model_name_textbox = gr.Textbox(label="Base model (for delta or adapter weights)")
|
361 |
+
"""
|
362 |
+
|
363 |
+
image, text = generate_captcha()
|
364 |
+
captcha_img = gr.Image(
|
365 |
+
image,
|
366 |
+
#container=False,
|
367 |
+
show_download_button=False,
|
368 |
+
show_fullscreen_button=False,
|
369 |
+
show_share_button=False,
|
370 |
+
)
|
371 |
+
captcha_input = gr.Textbox(placeholder="Enter the text in the image above")
|
372 |
+
submit_button = gr.Button("Submit Eval", interactive=True)
|
373 |
+
submission_result = gr.Markdown()
|
374 |
+
submit_button.click(
|
375 |
+
fn = add_new_eval,
|
376 |
+
inputs = [
|
377 |
+
model_name_textbox,
|
378 |
+
upload_button,
|
379 |
+
precision,
|
380 |
+
hf_model_id,
|
381 |
+
contact_email
|
382 |
+
],
|
383 |
+
outputs = [submission_result, model_name_textbox, precision, hf_model_id, contact_email],
|
384 |
+
)
|
385 |
|
386 |
with gr.Row():
|
387 |
with gr.Accordion("📙 Citation", open=False):
|