multimodalart HF staff commited on
Commit
d368317
1 Parent(s): e0bab07

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -65,12 +65,11 @@ def generate(prompt,
65
  x_concept_1="", x_concept_2="",
66
  avg_diff_x=None,
67
  total_images=[],
68
- progress=gr.Progress(track_tqdm=True)
69
  ):
 
70
  slider_x = [concept_2, concept_1]
71
  # check if avg diff for directions need to be re-calculated
72
- #print("slider_x", slider_x)
73
- #print("x_concept_1", x_concept_1, "x_concept_2", x_concept_2)
74
  if randomize_seed:
75
  seed = random.randint(0, MAX_SEED)
76
 
@@ -81,7 +80,7 @@ def generate(prompt,
81
  images = []
82
  high_scale = scale
83
  low_scale = -1 * scale
84
- for i in range(interm_steps):
85
  cur_scale = low_scale + (high_scale - low_scale) * i / (interm_steps - 1)
86
  image = clip_slider.generate(prompt,
87
  width=768,
 
65
  x_concept_1="", x_concept_2="",
66
  avg_diff_x=None,
67
  total_images=[],
68
+ progress=gr.Progress()
69
  ):
70
+ progress(0, desc="Calculating directions...")
71
  slider_x = [concept_2, concept_1]
72
  # check if avg diff for directions need to be re-calculated
 
 
73
  if randomize_seed:
74
  seed = random.randint(0, MAX_SEED)
75
 
 
80
  images = []
81
  high_scale = scale
82
  low_scale = -1 * scale
83
+ for i in progress.tqdm(range(interm_steps), desc="Generating images"):
84
  cur_scale = low_scale + (high_scale - low_scale) * i / (interm_steps - 1)
85
  image = clip_slider.generate(prompt,
86
  width=768,