Kurumi commited on
Commit
552a266
·
1 Parent(s): 020a010

fix: missing transformer package

Browse files
Files changed (2) hide show
  1. app.py +3 -2
  2. requirements.txt +2 -1
app.py CHANGED
@@ -7,9 +7,10 @@ from flask import (
7
  )
8
  from io import BytesIO
9
  from torch import float16
 
10
 
11
- app = Flask("ImageAPI")
12
 
 
13
 
14
  @app.route(rule="/", methods=["GET"])
15
  def main():
@@ -29,7 +30,7 @@ def main():
29
  pipeline.to("cuda")
30
 
31
  image = pipeline(
32
- prompt,
33
  height=1024,
34
  width=1024,
35
  ).images[0]
 
7
  )
8
  from io import BytesIO
9
  from torch import float16
10
+ from urllib.parse import unquote
11
 
 
12
 
13
+ app = Flask("ImageAPI")
14
 
15
  @app.route(rule="/", methods=["GET"])
16
  def main():
 
30
  pipeline.to("cuda")
31
 
32
  image = pipeline(
33
+ unquote(string=prompt),
34
  height=1024,
35
  width=1024,
36
  ).images[0]
requirements.txt CHANGED
@@ -2,4 +2,5 @@ diffusers
2
  flask
3
  gevent
4
  gunicorn
5
- torch
 
 
2
  flask
3
  gevent
4
  gunicorn
5
+ torch
6
+ transformers