Linoy Tsaban commited on
Commit
078a9c5
1 Parent(s): a6d2411

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import torch
 
3
  import requests
4
  from io import BytesIO
5
  from diffusers import StableDiffusionPipeline
@@ -199,7 +200,7 @@ def edit(input_image,
199
 
200
  def randomize_seed_fn(seed, randomize_seed):
201
  if randomize_seed:
202
- seed = random.randint(0, MAX_SEED)
203
  return seed
204
 
205
  ########
@@ -244,6 +245,8 @@ with gr.Blocks(css='style.css') as demo:
244
  with gr.Accordion("SEGA Concepts", open=False, visible=False):
245
  # with gr.Column(scale=1):
246
  edit_concept = gr.Textbox(lines=1, label="SEGA Edit Concepts", visible = True, interactive=True)
 
 
247
 
248
 
249
 
 
1
  import gradio as gr
2
  import torch
3
+ import numpy as np
4
  import requests
5
  from io import BytesIO
6
  from diffusers import StableDiffusionPipeline
 
200
 
201
  def randomize_seed_fn(seed, randomize_seed):
202
  if randomize_seed:
203
+ seed = random.randint(0, np.iinfo(np.int32).max)
204
  return seed
205
 
206
  ########
 
245
  with gr.Accordion("SEGA Concepts", open=False, visible=False):
246
  # with gr.Column(scale=1):
247
  edit_concept = gr.Textbox(lines=1, label="SEGA Edit Concepts", visible = True, interactive=True)
248
+ concepts = gr.Dropdown(
249
+ [], value=[], multiselect=True, label="Concepts" )
250
 
251
 
252