mfrashad commited on
Commit
c0b9c35
β€’
1 Parent(s): ef0df68

Fix seed input

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -94,7 +94,7 @@ def display_sample_pytorch(seed, truncation, directions, distances, scale, start
94
  def generate_image(seed, truncation,
95
  monster, female, skimpy, light, bodysuit, bulky, human_head,
96
  start_layer, end_layer):
97
-
98
  scale = 1
99
  params = {'monster': monster,
100
  'female': female,
@@ -124,7 +124,7 @@ def generate_image(seed, truncation,
124
  truncation = gr.inputs.Slider(minimum=0, maximum=1, default=0.5, label="Truncation")
125
  start_layer = gr.inputs.Number(default=0, label="Start Layer")
126
  end_layer = gr.inputs.Number(default=14, label="End Layer")
127
- seed = gr.inputs.Number(default=0, label="Seed")
128
 
129
  slider_max_val = 20
130
  slider_min_val = -20
 
94
  def generate_image(seed, truncation,
95
  monster, female, skimpy, light, bodysuit, bulky, human_head,
96
  start_layer, end_layer):
97
+ seed = hash(seed)
98
  scale = 1
99
  params = {'monster': monster,
100
  'female': female,
 
124
  truncation = gr.inputs.Slider(minimum=0, maximum=1, default=0.5, label="Truncation")
125
  start_layer = gr.inputs.Number(default=0, label="Start Layer")
126
  end_layer = gr.inputs.Number(default=14, label="End Layer")
127
+ seed = gr.inputs.Textbox(default="0", label="Seed")
128
 
129
  slider_max_val = 20
130
  slider_min_val = -20