daniissac commited on
Commit
1b4f79a
·
verified ·
1 Parent(s): ddd1d55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,8 +10,8 @@ pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float
10
  pipe.to(device)
11
 
12
  def generate_ghibli_style(image):
13
- prompt = "Studio Ghibli style portrait of a person, highly detailed, beautiful colors"
14
- result = pipe(prompt, init_image=image, strength=0.75).images[0]
15
  return result
16
 
17
  iface = gr.Interface(
@@ -19,7 +19,7 @@ iface = gr.Interface(
19
  inputs=gr.Image(type="pil"),
20
  outputs=gr.Image(),
21
  title="Studio Ghibli Portrait Generator",
22
- description="Upload a photo, and this AI will transform it into a Ghibli-style portrait!"
23
  )
24
 
25
  iface.launch()
 
10
  pipe.to(device)
11
 
12
  def generate_ghibli_style(image):
13
+ prompt = "ghibli style portrait"
14
+ result = pipe(prompt, init_image=image, strength=0.75, guidance_scale=7.0, num_inference_steps=30).images[0]
15
  return result
16
 
17
  iface = gr.Interface(
 
19
  inputs=gr.Image(type="pil"),
20
  outputs=gr.Image(),
21
  title="Studio Ghibli Portrait Generator",
22
+ description="Upload a photo to generate a Ghibli-style portrait!"
23
  )
24
 
25
  iface.launch()