Spaces:
Runtime error
Runtime error
Commit
·
a71f661
1
Parent(s):
7270b48
Update app.py
Browse files
app.py
CHANGED
@@ -227,11 +227,6 @@ with gr.Blocks() as interface:
|
|
227 |
col_count=(9, "fixed"),
|
228 |
)
|
229 |
endpoint_info_button = gr.Button(value="Get Info")
|
230 |
-
endpoint_info_button.click(
|
231 |
-
get_all_endpoints,
|
232 |
-
inputs=hf_token_input,
|
233 |
-
outputs=endpoints_table
|
234 |
-
)
|
235 |
|
236 |
# Deploy Endpoint
|
237 |
with gr.Tab("Deploy Endpoint"):
|
@@ -365,26 +360,6 @@ with gr.Blocks() as interface:
|
|
365 |
interactive=False
|
366 |
)
|
367 |
|
368 |
-
provider_selector.change(update_regions, inputs=provider_selector, outputs=region_selector)
|
369 |
-
region_selector.change(update_compute_options, inputs=[provider_selector, region_selector], outputs=compute_selector)
|
370 |
-
|
371 |
-
submit_button.click(
|
372 |
-
submit,
|
373 |
-
inputs=[
|
374 |
-
hf_token_input,
|
375 |
-
endpoint_name_input,
|
376 |
-
provider_selector,
|
377 |
-
region_selector,
|
378 |
-
repository_selector,
|
379 |
-
revision_selector,
|
380 |
-
task_selector,
|
381 |
-
framework_selector,
|
382 |
-
compute_selector,
|
383 |
-
min_node_selector,
|
384 |
-
max_node_selector,
|
385 |
-
security_selector],
|
386 |
-
outputs=status_txt)
|
387 |
-
|
388 |
# Update Endpoint
|
389 |
with gr.Tab("Update Endpoint"):
|
390 |
gr.Markdown("""
|
@@ -460,21 +435,6 @@ with gr.Blocks() as interface:
|
|
460 |
interactive=False
|
461 |
)
|
462 |
|
463 |
-
update_provider_selector.change(update_regions, inputs=update_provider_selector, outputs=update_region_selector)
|
464 |
-
update_region_selector.change(update_compute_options, inputs=[update_provider_selector, update_region_selector], outputs=update_compute_selector)
|
465 |
-
|
466 |
-
update_button.click(
|
467 |
-
update_endpoint,
|
468 |
-
inputs=[
|
469 |
-
hf_token_input,
|
470 |
-
update_endpoint_name_input,
|
471 |
-
update_min_node_input,
|
472 |
-
update_max_node_input,
|
473 |
-
update_compute_selector
|
474 |
-
],
|
475 |
-
outputs=update_status_txt
|
476 |
-
)
|
477 |
-
|
478 |
# Delete Endpoint
|
479 |
with gr.Tab("Delete Endpoint"):
|
480 |
gr.Markdown("""
|
@@ -495,15 +455,6 @@ with gr.Blocks() as interface:
|
|
495 |
interactive=False
|
496 |
)
|
497 |
|
498 |
-
delete_button.click(
|
499 |
-
delete_endpoint,
|
500 |
-
inputs=[
|
501 |
-
hf_token_input,
|
502 |
-
delete_endpoint_name_input
|
503 |
-
],
|
504 |
-
outputs=delete_status_txt
|
505 |
-
)
|
506 |
-
|
507 |
# Pricing Table
|
508 |
with gr.Tab("Pricing Table"):
|
509 |
gr.Markdown("""
|
@@ -546,4 +497,56 @@ with gr.Blocks() as interface:
|
|
546 |
]
|
547 |
)
|
548 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
549 |
interface.launch()
|
|
|
227 |
col_count=(9, "fixed"),
|
228 |
)
|
229 |
endpoint_info_button = gr.Button(value="Get Info")
|
|
|
|
|
|
|
|
|
|
|
230 |
|
231 |
# Deploy Endpoint
|
232 |
with gr.Tab("Deploy Endpoint"):
|
|
|
360 |
interactive=False
|
361 |
)
|
362 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
363 |
# Update Endpoint
|
364 |
with gr.Tab("Update Endpoint"):
|
365 |
gr.Markdown("""
|
|
|
435 |
interactive=False
|
436 |
)
|
437 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
# Delete Endpoint
|
439 |
with gr.Tab("Delete Endpoint"):
|
440 |
gr.Markdown("""
|
|
|
455 |
interactive=False
|
456 |
)
|
457 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
# Pricing Table
|
459 |
with gr.Tab("Pricing Table"):
|
460 |
gr.Markdown("""
|
|
|
497 |
]
|
498 |
)
|
499 |
|
500 |
+
# Info Tab Events
|
501 |
+
endpoint_info_button.click(
|
502 |
+
get_all_endpoints,
|
503 |
+
inputs=hf_token_input,
|
504 |
+
outputs=endpoints_table
|
505 |
+
)
|
506 |
+
|
507 |
+
# Deploy Tab Events
|
508 |
+
provider_selector.change(update_regions, inputs=provider_selector, outputs=region_selector)
|
509 |
+
region_selector.change(update_compute_options, inputs=[provider_selector, region_selector], outputs=compute_selector)
|
510 |
+
submit_button.click(
|
511 |
+
submit,
|
512 |
+
inputs=[
|
513 |
+
hf_token_input,
|
514 |
+
endpoint_name_input,
|
515 |
+
provider_selector,
|
516 |
+
region_selector,
|
517 |
+
repository_selector,
|
518 |
+
revision_selector,
|
519 |
+
task_selector,
|
520 |
+
framework_selector,
|
521 |
+
compute_selector,
|
522 |
+
min_node_selector,
|
523 |
+
max_node_selector,
|
524 |
+
security_selector],
|
525 |
+
outputs=status_txt)
|
526 |
+
|
527 |
+
# Update Tab Events
|
528 |
+
update_provider_selector.change(update_regions, inputs=update_provider_selector, outputs=update_region_selector)
|
529 |
+
update_region_selector.change(update_compute_options, inputs=[update_provider_selector, update_region_selector], outputs=update_compute_selector)
|
530 |
+
update_button.click(
|
531 |
+
update_endpoint,
|
532 |
+
inputs=[
|
533 |
+
hf_token_input,
|
534 |
+
update_endpoint_name_input,
|
535 |
+
update_min_node_input,
|
536 |
+
update_max_node_input,
|
537 |
+
update_compute_selector
|
538 |
+
],
|
539 |
+
outputs=update_status_txt
|
540 |
+
)
|
541 |
+
|
542 |
+
# Delete Tab Events
|
543 |
+
delete_button.click(
|
544 |
+
delete_endpoint,
|
545 |
+
inputs=[
|
546 |
+
hf_token_input,
|
547 |
+
delete_endpoint_name_input
|
548 |
+
],
|
549 |
+
outputs=delete_status_txt
|
550 |
+
)
|
551 |
+
|
552 |
interface.launch()
|