cyanab commited on
Commit
356ec78
1 Parent(s): 1c6c16a

init_image.read() isntead of with open

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def generate_image(text_prompt, init_image):
29
  }
30
 
31
  files = {
32
- 'init_image': open(init_image, 'rb'),
33
  'options': (None, options),
34
  }
35
 
@@ -52,6 +52,6 @@ inputs = [
52
  gr.inputs.Image(label="Image")
53
  ]
54
 
55
- outputs = gr.outputs.Image(type='filepath', label="Generated Image")
56
 
57
  gr.Interface(fn=generate_image, inputs=inputs, outputs=outputs).launch(debug=True)
 
29
  }
30
 
31
  files = {
32
+ 'init_image': init_image.read(),
33
  'options': (None, options),
34
  }
35
 
 
52
  gr.inputs.Image(label="Image")
53
  ]
54
 
55
+ outputs = gr.outputs.Image(type='numpy', label="Generated Image")
56
 
57
  gr.Interface(fn=generate_image, inputs=inputs, outputs=outputs).launch(debug=True)