Johannes commited on
Commit
85986ce
·
1 Parent(s): b4bbb82

add example

Browse files
Files changed (1) hide show
  1. app.py +11 -6
app.py CHANGED
@@ -27,16 +27,21 @@ def generate_images(prompt: str, negative_prompt: str, num_imgs_to_gen: int, num
27
 
28
  # pass function, input type for prompt, the output for multiple images
29
  gr.Interface(
30
- generate_images,
31
- [
 
 
 
 
 
32
  gr.Textbox(label="Positive Prompt", value="a photo of paranoid marvin a robot"),
33
  gr.Textbox(label="Negative Prompt", value="low quality, deformed"),
34
  gr.Slider(label='Number of gen image', minimum=1, maximum=4, value=2, step=1),
35
  gr.Slider(label="Inference Steps", value=50),
36
- gr.Number(label='Guidance scale', value=7.5),
37
- ], [
 
38
  gr.Gallery(show_label=False).style(grid=(1,2)),
39
  ],
40
- title="Keras Dreambooth - Marvin the Paranoid Android",
41
- description="This model has been fine-tuned to learn the concept of Marvin the paranoid Android from The Hitchhiker's Guide to the Galaxy."
42
  ).queue().launch(debug=True)
 
27
 
28
  # pass function, input type for prompt, the output for multiple images
29
  gr.Interface(
30
+ title="Keras Dreambooth - Marvin the Paranoid Android",
31
+ description="""This SD model has been fine-tuned to learn the concept of Marvin the Paranoid Android from The Hitchhiker's Guide to the Galaxy.
32
+
33
+ To generate your own Marvin, use the phrase "paranoid marvin a robot" in your prompt.
34
+ """,
35
+ fn=generate_images,
36
+ inputs=[
37
  gr.Textbox(label="Positive Prompt", value="a photo of paranoid marvin a robot"),
38
  gr.Textbox(label="Negative Prompt", value="low quality, deformed"),
39
  gr.Slider(label='Number of gen image', minimum=1, maximum=4, value=2, step=1),
40
  gr.Slider(label="Inference Steps", value=50),
41
+ gr.Number(label='Guidance scale', value=7.5, maximum=15, minimum=0, step=0.5),
42
+ ],
43
+ outputs=[
44
  gr.Gallery(show_label=False).style(grid=(1,2)),
45
  ],
46
+ examples=[["a drawing of a white lowpoly paranoid marvin a robot, high quality, 4k, trending on artstation", "low quality, deformed, dark", 2, 50, 7.5]],
 
47
  ).queue().launch(debug=True)