Spaces:
Runtime error
Runtime error
BennoKrojer
commited on
Commit
•
04856c4
1
Parent(s):
e3aed70
Update app.py
Browse files
app.py
CHANGED
@@ -52,10 +52,10 @@ cap = str(index)
|
|
52 |
|
53 |
if st.session_state.show:
|
54 |
caps[true_idx] = f'{true_idx} (TARGET IMAGE)'
|
55 |
-
img = Image.open(io.BytesIO(requests.get(img_urls[
|
56 |
img_width, img_height = img.size
|
57 |
smaller = min(img_width, img_height)
|
58 |
-
images[true_idx] = ImageOps.expand(
|
59 |
if true_idx == index:
|
60 |
cap = f'{true_idx} (TARGET IMAGE)'
|
61 |
else:
|
|
|
52 |
|
53 |
if st.session_state.show:
|
54 |
caps[true_idx] = f'{true_idx} (TARGET IMAGE)'
|
55 |
+
img = Image.open(io.BytesIO(requests.get(img_urls[true_idx], stream=True).content))
|
56 |
img_width, img_height = img.size
|
57 |
smaller = min(img_width, img_height)
|
58 |
+
images[true_idx] = ImageOps.expand(img,border=smaller//8,fill='green')
|
59 |
if true_idx == index:
|
60 |
cap = f'{true_idx} (TARGET IMAGE)'
|
61 |
else:
|