huzey commited on
Commit
714612e
1 Parent(s): 8170619

optimize run

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -140,7 +140,7 @@ def ncut_run(
140
  rgb = dont_use_too_much_green(rgb)
141
  return to_pil_images(rgb), [], logging_str
142
 
143
- @spaces.GPU(duration=10)
144
  def quick_run(images, **kwargs):
145
  return ncut_run(images, **kwargs)
146
 
@@ -193,7 +193,7 @@ def run_fn(
193
  num_images = len(images)
194
  if num_images > 100:
195
  return super_duper_long_run(images, **kwargs)
196
- if num_images > 20:
197
  return long_run(images, **kwargs)
198
  if embedding_method == "UMAP":
199
  if perplexity >= 250 or num_sample_tsne >= 500:
 
140
  rgb = dont_use_too_much_green(rgb)
141
  return to_pil_images(rgb), [], logging_str
142
 
143
+ @spaces.GPU(duration=15)
144
  def quick_run(images, **kwargs):
145
  return ncut_run(images, **kwargs)
146
 
 
193
  num_images = len(images)
194
  if num_images > 100:
195
  return super_duper_long_run(images, **kwargs)
196
+ if num_images > 10:
197
  return long_run(images, **kwargs)
198
  if embedding_method == "UMAP":
199
  if perplexity >= 250 or num_sample_tsne >= 500: