Shivdutta commited on
Commit
24936d2
·
verified ·
1 Parent(s): 6338e31

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -296,9 +296,7 @@ def inference(prompt, seed, style):
296
  if prompt is not None and style is not None and seed is not None:
297
  style = dict_styles[style]
298
  torch.manual_seed(seed)
299
- num_inference_steps =10
300
- guidance_scale =7.5
301
- result = generate_with_prompt_style_guidance(prompt, style,seed,num_inference_steps,guidance_scale)
302
  return np.array(result)
303
  else:
304
  return None
@@ -309,7 +307,7 @@ examples = [["Pink Ferrari Car", 24041975,"Manga"], ["A man sipping tea wearing
309
 
310
  demo = gr.Interface(inference,
311
  inputs = [gr.Textbox(label='Prompt', value='Pink Ferrari Car'), gr.Textbox(label='Seed', value=24041975),
312
- gr.Dropdown(['Dr Strange', 'GTA-5', 'Manga', 'Pokemon','Illustration','Matrix','Oil Painting'], label='Style')],
313
  outputs = [
314
  gr.Image(label="Stable Diffusion Output"),
315
  ],
 
296
  if prompt is not None and style is not None and seed is not None:
297
  style = dict_styles[style]
298
  torch.manual_seed(seed)
299
+ result = generate_with_prompt_style_guidance(prompt, style,seed,num_inference_steps=10,guidance_scale=7.5)
 
 
300
  return np.array(result)
301
  else:
302
  return None
 
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
  ],