multimodalart HF staff commited on
Commit
f8e56c2
1 Parent(s): 9d731d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -40,12 +40,22 @@ def convert_to_centered_scale(num):
40
  return tuple(range(start, end + 1))
41
 
42
  @spaces.GPU(duration=200)
43
- def generate(concept_1, concept_2, scale, prompt, randomize_seed=True, seed=42, recalc_directions=True, iterations=200, steps=4, interm_steps=9, guidance_scale=3.5,
 
 
 
 
 
 
 
 
 
 
44
  x_concept_1="", x_concept_2="",
45
  avg_diff_x=None,
46
  total_images=[],
47
  progress=gr.Progress(track_tqdm=True)
48
- ):
49
  slider_x = [concept_2, concept_1]
50
  # check if avg diff for directions need to be re-calculated
51
  print("slider_x", slider_x)
@@ -119,7 +129,7 @@ examples = [["winter", "summer", 1.25, "a dog in the park"], ["USA suburb", "Eur
119
  image_seq = gr.Image(label="Strip", elem_id="strip")
120
  output_image = gr.Image(label="Gif", elem_id="gif")
121
  post_generation_image = gr.Image(label="Generated Images")
122
- post_generation_slider = gr.Slider(minimum=-2, maximum=2, value=0, step=1, interactive=False)
123
  seed = gr.Slider(minimum=0, maximum=MAX_SEED, step=1, label="Seed", interactive=True, randomize=True)
124
 
125
  with gr.Blocks(css=css) as demo:
 
40
  return tuple(range(start, end + 1))
41
 
42
  @spaces.GPU(duration=200)
43
+ def generate(concept_1,
44
+ concept_2,
45
+ scale,
46
+ prompt,
47
+ randomize_seed=True,
48
+ seed=42,
49
+ recalc_directions=True,
50
+ iterations=200,
51
+ steps=3,
52
+ interm_steps=21,
53
+ guidance_scale=3.5,
54
  x_concept_1="", x_concept_2="",
55
  avg_diff_x=None,
56
  total_images=[],
57
  progress=gr.Progress(track_tqdm=True)
58
+ ):
59
  slider_x = [concept_2, concept_1]
60
  # check if avg diff for directions need to be re-calculated
61
  print("slider_x", slider_x)
 
129
  image_seq = gr.Image(label="Strip", elem_id="strip")
130
  output_image = gr.Image(label="Gif", elem_id="gif")
131
  post_generation_image = gr.Image(label="Generated Images")
132
+ post_generation_slider = gr.Slider(minimum=-10, maximum=10, value=0, step=1)
133
  seed = gr.Slider(minimum=0, maximum=MAX_SEED, step=1, label="Seed", interactive=True, randomize=True)
134
 
135
  with gr.Blocks(css=css) as demo: