ameerazam08 commited on
Commit
f185777
1 Parent(s): 790758f

updated the all

Browse files
Files changed (1) hide show
  1. app.py +11 -15
app.py CHANGED
@@ -39,7 +39,7 @@ def super_esr(source_image,prompt,negative_prompt,strength,seed,num_inference_st
39
  controlnet_conditioning_image=condition_image,
40
  width=condition_image.size[0],
41
  height=condition_image.size[1],
42
- strength=1.0,
43
  generator=generator,
44
  num_inference_steps=num_inference_steps,
45
  ).images[0]
@@ -49,28 +49,24 @@ def super_esr(source_image,prompt,negative_prompt,strength,seed,num_inference_st
49
  # define and take input the same as the super_esr function
50
 
51
  inputs=[
52
- gr.inputs.Image(type="pil",label="Source Image"),
53
- gr.inputs.Textbox(lines=2,label="Prompt"),
54
- gr.inputs.Textbox(lines=2,label="Negative Prompt"),
55
- gr.inputs.Slider(minimum=0,maximum=1,label="Strength"),
56
- gr.inputs.Slider(minimum=0,maximum=100,label="Seed"),
57
- gr.inputs.Slider(minimum=0,maximum=100,label="Num Inference Steps")
58
  ]
59
  outputs=[
60
- gr.outputs.Image(type="pil",label="Output Image")
61
  ]
62
  title="Super ESR"
63
  description="Super ESR is a super resolution model that uses diffusion to generate high resolution images from low resolution images"
64
- examples=[
65
- ["https://i.imgur.com/9IqyX1F.png","best quality","blur, lowres, bad anatomy, bad hands, cropped, worst quality",1.0,0,100],
66
- ["https://i.imgur.com/9IqyX1F.png","best quality","blur, lowres, bad anatomy, bad hands, cropped, worst quality",1.0,0,100],
67
- ]
68
  # create a queue of the requests
69
 
70
 
71
 
72
- demo=gr.Interface(fn=super_esr,inputs=inputs,outputs=outputs,title=title,description=description,examples=examples)
73
 
74
- # demo.queue(max_size=20).launch()
75
- demp.launch()
76
 
 
39
  controlnet_conditioning_image=condition_image,
40
  width=condition_image.size[0],
41
  height=condition_image.size[1],
42
+ strength=strength,
43
  generator=generator,
44
  num_inference_steps=num_inference_steps,
45
  ).images[0]
 
49
  # define and take input the same as the super_esr function
50
 
51
  inputs=[
52
+ gr.Image(type="pil",label="Source Image"),
53
+ gr.Textbox(lines=2,label="Prompt"),
54
+ gr.Textbox(lines=2,label="Negative Prompt"),
55
+ gr.Slider(minimum=0,maximum=1,value=1.0,label="Strength"),
56
+ gr.Slider(minimum=-100000,maximum=100000,value=1,label="Seed"),
57
+ gr.Slider(minimum=0,maximum=100,value=20,label="Num Inference Steps")
58
  ]
59
  outputs=[
60
+ gr.Image(type="pil",label="Output Image")
61
  ]
62
  title="Super ESR"
63
  description="Super ESR is a super resolution model that uses diffusion to generate high resolution images from low resolution images"
 
 
 
 
64
  # create a queue of the requests
65
 
66
 
67
 
68
+ demo=gr.Interface(fn=super_esr,inputs=inputs,outputs=outputs,title=title,description=description)
69
 
70
+ demo.queue(max_size=20).launch()
71
+ # demo.launch()
72