huzey commited on
Commit
9237b56
1 Parent(s): 6573567

better api name

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -10,7 +10,6 @@ if USE_HUGGINGFACE_SPACE: # huggingface ZeroGPU, dynamic GPU allocation
10
  USE_HUGGINGFACE_SPACE = False # run on local machine
11
  BATCH_SIZE = 1
12
 
13
- import os
14
  import gradio as gr
15
 
16
  import torch
@@ -19,8 +18,7 @@ from PIL import Image
19
  import numpy as np
20
  import time
21
  import threading
22
-
23
- import gradio as gr
24
 
25
  from backbone import extract_features, download_all_models, get_model
26
  from backbone import MODEL_DICT, LAYER_DICT, RES_DICT
@@ -657,7 +655,8 @@ with demo:
657
  embedding_method_dropdown, num_sample_tsne_slider, knn_tsne_slider,
658
  perplexity_slider, n_neighbors_slider, min_dist_slider, sampling_method_dropdown
659
  ],
660
- outputs=[output_gallery, logging_text]
 
661
  )
662
 
663
  with gr.Tab('NCut'):
@@ -715,7 +714,8 @@ with demo:
715
  perplexity_slider, n_neighbors_slider, min_dist_slider, sampling_method_dropdown,
716
  old_school_ncut_checkbox
717
  ],
718
- outputs=[output_gallery, logging_text]
 
719
  )
720
 
721
  with gr.Tab('Recursive Cut'):
@@ -781,7 +781,8 @@ with demo:
781
  false_placeholder, number_placeholder, true_placeholder,
782
  l2_num_eig_slider, l3_num_eig_slider, metric_dropdown,
783
  ],
784
- outputs=[l1_gallery, l2_gallery, l3_gallery, logging_text]
 
785
  )
786
 
787
 
@@ -816,7 +817,8 @@ with demo:
816
  perplexity_slider, n_neighbors_slider, min_dist_slider, sampling_method_dropdown,
817
  place_holder_false, max_frame_number
818
  ],
819
- outputs=[video_output_gallery, logging_text]
 
820
  )
821
 
822
  with gr.Tab('Text'):
 
10
  USE_HUGGINGFACE_SPACE = False # run on local machine
11
  BATCH_SIZE = 1
12
 
 
13
  import gradio as gr
14
 
15
  import torch
 
18
  import numpy as np
19
  import time
20
  import threading
21
+ import os
 
22
 
23
  from backbone import extract_features, download_all_models, get_model
24
  from backbone import MODEL_DICT, LAYER_DICT, RES_DICT
 
655
  embedding_method_dropdown, num_sample_tsne_slider, knn_tsne_slider,
656
  perplexity_slider, n_neighbors_slider, min_dist_slider, sampling_method_dropdown
657
  ],
658
+ outputs=[output_gallery, logging_text],
659
+ api_name="API_AlignedCut"
660
  )
661
 
662
  with gr.Tab('NCut'):
 
714
  perplexity_slider, n_neighbors_slider, min_dist_slider, sampling_method_dropdown,
715
  old_school_ncut_checkbox
716
  ],
717
+ outputs=[output_gallery, logging_text],
718
+ api_name="API_NCut",
719
  )
720
 
721
  with gr.Tab('Recursive Cut'):
 
781
  false_placeholder, number_placeholder, true_placeholder,
782
  l2_num_eig_slider, l3_num_eig_slider, metric_dropdown,
783
  ],
784
+ outputs=[l1_gallery, l2_gallery, l3_gallery, logging_text],
785
+ api_name="API_RecursiveCut"
786
  )
787
 
788
 
 
817
  perplexity_slider, n_neighbors_slider, min_dist_slider, sampling_method_dropdown,
818
  place_holder_false, max_frame_number
819
  ],
820
+ outputs=[video_output_gallery, logging_text],
821
+ api_name="API_VideoCut",
822
  )
823
 
824
  with gr.Tab('Text'):