awacke1 commited on
Commit
5c9cd21
1 Parent(s): 7fcace2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ os.system("cd cloob-latent-diffusion;pip install omegaconf pillow pytorch-lightn
6
  # setup some example images
7
  examples = []
8
  EXAMPLES_DIR = 'examples'
 
9
  if os.path.isdir(EXAMPLES_DIR):
10
  for file in os.listdir(EXAMPLES_DIR):
11
  path = EXAMPLES_DIR + "/" + file
@@ -166,7 +167,7 @@ def gen_ims(prompt, im_prompt=None, seed=None, n_steps=10, method='plms'):
166
  iface = gr.Interface(fn=gen_ims,
167
  inputs=[#gr.inputs.Slider(minimum=1, maximum=1, step=1, default=1,label="Number of images"),
168
  #gr.inputs.Slider(minimum=0, maximum=200, step=1, label='Random seed', default=0),
169
- gr.inputs.Textbox(label="Text prompt"),
170
  gr.inputs.Image(optional=True, label="Image prompt", type='filepath'),
171
  #gr.inputs.Slider(minimum=10, maximum=35, step=1, default=15,label="Number of steps")
172
  ],
 
6
  # setup some example images
7
  examples = []
8
  EXAMPLES_DIR = 'examples'
9
+ DEFAULT_PROMPT = "<image>"
10
  if os.path.isdir(EXAMPLES_DIR):
11
  for file in os.listdir(EXAMPLES_DIR):
12
  path = EXAMPLES_DIR + "/" + file
 
167
  iface = gr.Interface(fn=gen_ims,
168
  inputs=[#gr.inputs.Slider(minimum=1, maximum=1, step=1, default=1,label="Number of images"),
169
  #gr.inputs.Slider(minimum=0, maximum=200, step=1, label='Random seed', default=0),
170
+ gr.inputs.Textbox(value=DEFAULT_PROMPT, label="Text prompt"),
171
  gr.inputs.Image(optional=True, label="Image prompt", type='filepath'),
172
  #gr.inputs.Slider(minimum=10, maximum=35, step=1, default=15,label="Number of steps")
173
  ],