Alberto Carmona commited on
Commit
4912cf9
1 Parent(s): 6923f3c

Add title and modify the caption

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -174,6 +174,8 @@ def generate_text_from_image(img):
174
  def generate_drawing_from_image(img, steps=100, seed=42, guidance_scale=6.0):
175
  print('RUN: generate_drawing_from_image')
176
  caption = generate_text_from_image(img)
 
 
177
  gen_image = generate_image_from_text(caption, steps=steps, seed=seed, guidance_scale=guidance_scale)
178
  return gen_image
179
 
@@ -182,6 +184,7 @@ random_seed = random.randint(0, 2147483647)
182
 
183
  gr.Interface(
184
  generate_drawing_from_image,
 
185
  inputs=[
186
  gr.Image(type="pil"),
187
  gr.inputs.Slider(1, 100, label='Inference Steps', default=50, step=1),
 
174
  def generate_drawing_from_image(img, steps=100, seed=42, guidance_scale=6.0):
175
  print('RUN: generate_drawing_from_image')
176
  caption = generate_text_from_image(img)
177
+ caption = caption + ', style drawing of kid'
178
+ print('\tcaption: ' + caption)
179
  gen_image = generate_image_from_text(caption, steps=steps, seed=seed, guidance_scale=guidance_scale)
180
  return gen_image
181
 
 
184
 
185
  gr.Interface(
186
  generate_drawing_from_image,
187
+ title='Reimagine the same image but drawn by a kid :)',
188
  inputs=[
189
  gr.Image(type="pil"),
190
  gr.inputs.Slider(1, 100, label='Inference Steps', default=50, step=1),