ka1kuk commited on
Commit
14c2d1c
1 Parent(s): 20a756d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -18,7 +18,9 @@ def generate_image():
18
  prompt = request.args.get('prompt')
19
  image = pipe(prompt).images[0]
20
  # do something with the generated image
21
- return image
 
 
22
 
23
  if __name__ == '__main__':
24
- app.run()
 
18
  prompt = request.args.get('prompt')
19
  image = pipe(prompt).images[0]
20
  # do something with the generated image
21
+ image_data = image.tobytes().hex()
22
+
23
+ return {'image_data': image_data}
24
 
25
  if __name__ == '__main__':
26
+ app.run(host='0.0.0.0', port=5000)