ka1kuk commited on
Commit
b9c73b1
1 Parent(s): 8647971

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -6
main.py CHANGED
@@ -28,7 +28,7 @@ pipe.safety_checker = dummy
28
 
29
  @app.get("/")
30
  def hello():
31
- return "Hello, I'm Linlada"
32
 
33
 
34
  @app.get("/gen/{prompt}")
@@ -37,10 +37,7 @@ def generate_image(prompt: str):
37
  guidance_scale=8.5 # how strict to follow the prompt
38
  ).images[0]
39
  # Save the image
40
- image.save('static/image.png')
41
 
42
- # do something with the generated image
43
- image_data = image.tobytes().hex()
44
- image_url = url_for('static', filename='image.png')
45
 
46
- return {'image_data': image_data, 'image_url': image_url}
 
28
 
29
  @app.get("/")
30
  def hello():
31
+ return "Hello, I'm Artist"
32
 
33
 
34
  @app.get("/gen/{prompt}")
 
37
  guidance_scale=8.5 # how strict to follow the prompt
38
  ).images[0]
39
  # Save the image
40
+ image.save('image.png')
41
 
 
 
 
42
 
43
+ return "Gen done"