Shivdutta commited on
Commit
a6156b5
·
verified ·
1 Parent(s): 1392cf8

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -302,12 +302,29 @@ def inference(prompt, seed, style):
302
  return None
303
 
304
  title = "Stable Diffusion and Textual Inversion"
305
- description = "A simple Gradio interface to stylize Stable Diffusion outputs"
306
  examples = [["Pink Ferrari Car", 24041975,"Manga"], ["A man sipping tea wearing a spacesuit on the moon",24041975, "GTA-5"]] # Added valid styles
307
 
308
  demo = gr.Interface(inference,
309
  inputs = [gr.Textbox(label='Prompt', value='Pink Ferrari Car'), gr.Textbox(label='Seed', value=24041975),
310
- gr.Dropdown(['Dr Strange', 'GTA-5', 'Manga', 'Pokemon','Illustration','Matrix','Oil Painting'], label='Style', value='Dr Strange')],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
311
  outputs = [
312
  gr.Image(label="Stable Diffusion Output"),
313
  ],
 
302
  return None
303
 
304
  title = "Stable Diffusion and Textual Inversion"
305
+ description = "Gradio interface to apply style to Stable Diffusion outputs"
306
  examples = [["Pink Ferrari Car", 24041975,"Manga"], ["A man sipping tea wearing a spacesuit on the moon",24041975, "GTA-5"]] # Added valid styles
307
 
308
  demo = gr.Interface(inference,
309
  inputs = [gr.Textbox(label='Prompt', value='Pink Ferrari Car'), gr.Textbox(label='Seed', value=24041975),
310
+ gr.Dropdown(['Dr Strange', 'GTA-5', 'Manga', 'Pokemon','Illustration','Matrix','Oil Painting'], label='Style', value='Dr Strange'),
311
+ gr.Slider(
312
+ minimum=10,
313
+ maximum=20,
314
+ value=10,
315
+ step=5,
316
+ label="Select Number of Steps",
317
+ interactive=True,
318
+ ),
319
+ gr.Slider(
320
+ minimum=0,
321
+ maximum=10,
322
+ value=8,
323
+ step=8,
324
+ label="Select Guidance Scale",
325
+ interactive=True,
326
+ )
327
+ ],
328
  outputs = [
329
  gr.Image(label="Stable Diffusion Output"),
330
  ],