mikonvergence commited on
Commit
0f13dda
1 Parent(s): 2c4ff95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +42 -45
app.py CHANGED
@@ -16,52 +16,49 @@ def create_demo():
16
  gr.Markdown('Type what you want to see and the app will create images with the faces in the input while preserving body pose. Should work for multiple humans too!')
17
 
18
  with gr.Group():
19
- with gr.Box():
20
- with gr.Column():
21
- with gr.Row() as main_blocks:
22
- with gr.Column() as input_step:
23
- gr.Markdown('# Input')
24
- with gr.Tab("Upload Image"):
25
- image_upload = gr.Image(source='upload',
26
- height=500,
27
- type='pil',#numpy',
28
- tool=None,
29
- elem_classes="image_upload",
30
- label='Image Upload')
31
- with gr.Tab("Webcam"):
32
- image_cam = gr.Image(source='webcam',
33
- height=500,
34
- type='pil',#numpy',
35
- tool=None,
36
- elem_classes="image_upload",
37
- label='Webcam')
38
- prompt = gr.Textbox(value="Astronaut, photograph inside the ISS International Space Station corridor", label="Prompt:")
39
- send_button = gr.Button(label='Generate', value='Generate')
40
-
41
- with gr.Column() as output_step:
42
- gr.Markdown('# Output')
43
- output_image = gr.Gallery(label="Generated images",
44
- show_label=False,
45
- preview=True,
46
- elem_id="output_image",
47
- object_fit="contain",
48
- height="auto")
49
- with gr.Accordion('Settings', open=False):
50
 
51
- num_steps = gr.Slider(label='Steps',
52
- minimum=1,
53
- maximum=100,
54
- value=25,
55
- step=1)
56
- n_prompt = gr.Textbox(value="", label="Negative Prompt: Avoid these features in the image...")
57
- original_resolution=gr.Checkbox(value=False,
58
- label="Preserve Resolution",
59
- info="Prevent Downscaling to 512 pixels (default)")
60
- seed = gr.Slider(label='Seed',
61
- minimum=-1,
62
- maximum=2147483647,
63
- step=1,
64
- randomize=True)
65
 
66
 
67
  with gr.Accordion('How does it work?', open=False):
 
16
  gr.Markdown('Type what you want to see and the app will create images with the faces in the input while preserving body pose. Should work for multiple humans too!')
17
 
18
  with gr.Group():
19
+ with gr.Column():
20
+ with gr.Row() as main_blocks:
21
+ with gr.Column() as input_step:
22
+ gr.Markdown('# Input')
23
+ with gr.Tab("Upload Image"):
24
+ image_upload = gr.Image(sources='upload',
25
+ height=500,
26
+ type='pil',#numpy',
27
+ elem_classes="image_upload",
28
+ label='Image Upload')
29
+ with gr.Tab("Webcam"):
30
+ image_cam = gr.Image(sources='webcam',
31
+ height=500,
32
+ type='pil',#numpy',
33
+ elem_classes="image_upload",
34
+ label='Webcam')
35
+ prompt = gr.Textbox(value="Astronaut, photograph inside the ISS International Space Station corridor", label="Prompt:")
36
+ send_button = gr.Button(value='Generate')
37
+
38
+ with gr.Column() as output_step:
39
+ gr.Markdown('# Output')
40
+ output_image = gr.Gallery(label="Generated images",
41
+ show_label=False,
42
+ preview=True,
43
+ elem_id="output_image",
44
+ object_fit="contain",
45
+ height="auto")
46
+ with gr.Accordion('Settings', open=False):
 
 
 
47
 
48
+ num_steps = gr.Slider(label='Steps',
49
+ minimum=1,
50
+ maximum=100,
51
+ value=25,
52
+ step=1)
53
+ n_prompt = gr.Textbox(value="", label="Negative Prompt: Avoid these features in the image...")
54
+ original_resolution=gr.Checkbox(value=False,
55
+ label="Preserve Resolution",
56
+ info="Prevent Downscaling to 512 pixels (default)")
57
+ seed = gr.Slider(label='Seed',
58
+ minimum=-1,
59
+ maximum=2147483647,
60
+ step=1,
61
+ randomize=True)
62
 
63
 
64
  with gr.Accordion('How does it work?', open=False):