boris commited on
Commit
8db9ed4
1 Parent(s): d54a7be

style: reformat per black

Browse files
Files changed (2) hide show
  1. app/streamlit/backend.py +3 -4
  2. setup.py +1 -1
app/streamlit/backend.py CHANGED
@@ -3,15 +3,14 @@ from io import BytesIO
3
  import base64
4
  from PIL import Image
5
 
 
6
  class ServiceError(Exception):
7
  def __init__(self, status_code):
8
  self.status_code = status_code
9
 
 
10
  def get_images_from_backend(prompt, backend_url):
11
- r = requests.post(
12
- backend_url,
13
- json={"prompt": prompt}
14
- )
15
  if r.status_code == 200:
16
  images = r.json()["images"]
17
  images = [Image.open(BytesIO(base64.b64decode(img))) for img in images]
 
3
  import base64
4
  from PIL import Image
5
 
6
+
7
  class ServiceError(Exception):
8
  def __init__(self, status_code):
9
  self.status_code = status_code
10
 
11
+
12
  def get_images_from_backend(prompt, backend_url):
13
+ r = requests.post(backend_url, json={"prompt": prompt})
 
 
 
14
  if r.status_code == 200:
15
  images = r.json()["images"]
16
  images = [Image.open(BytesIO(base64.b64decode(img))) for img in images]
setup.py CHANGED
@@ -1,4 +1,4 @@
1
  from setuptools import setup
2
 
3
  if __name__ == "__main__":
4
- setup()
 
1
  from setuptools import setup
2
 
3
  if __name__ == "__main__":
4
+ setup()