Update app.py
Browse files
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 |
-
|
|
|
|
|
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)
|