ka1kuk commited on
Commit
fac22d0
1 Parent(s): 7fb8c56

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -4
main.py CHANGED
@@ -24,14 +24,13 @@ def dummy(images, **kwargs):
24
 
25
  pipe.safety_checker = dummy
26
 
27
- @app.route('/')
28
  def hello():
29
  return "Hello, I'm Linlada"
30
 
31
 
32
- @app.route('/gen')
33
- def generate_image():
34
- prompt = request.args.get('prompt')
35
  image = pipe(prompt).images[0]
36
  # Save the image
37
  image.save('static/image.png')
 
24
 
25
  pipe.safety_checker = dummy
26
 
27
+ @app.get("/")
28
  def hello():
29
  return "Hello, I'm Linlada"
30
 
31
 
32
+ @app.get("/gen/{prompt}")
33
+ def generate_image(prompt: str):
 
34
  image = pipe(prompt).images[0]
35
  # Save the image
36
  image.save('static/image.png')