Skip to content

Commit

Permalink
style: reformat per black
Browse files Browse the repository at this point in the history
  • Loading branch information
borisdayma committed Nov 30, 2021
1 parent d54a7be commit 8db9ed4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions app/streamlit/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
import base64
from PIL import Image


class ServiceError(Exception):
def __init__(self, status_code):
self.status_code = status_code


def get_images_from_backend(prompt, backend_url):
r = requests.post(
backend_url,
json={"prompt": prompt}
)
r = requests.post(backend_url, json={"prompt": prompt})
if r.status_code == 200:
images = r.json()["images"]
images = [Image.open(BytesIO(base64.b64decode(img))) for img in images]
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup

if __name__ == "__main__":
setup()
setup()

0 comments on commit 8db9ed4

Please sign in to comment.