Spaces:
Runtime error
Runtime error
BennoKrojer
commited on
Commit
•
6115563
1
Parent(s):
c004799
app.py
CHANGED
@@ -20,7 +20,7 @@ img_set = random.sample(list(set2ids.keys()),1)[0]
|
|
20 |
st.set_page_config(layout="wide")
|
21 |
col1, col2 = st.columns(2)
|
22 |
|
23 |
-
images = [prefix+'/'+img_set+'/'+i for i in set2ids[
|
24 |
|
25 |
if st.button('Sample set of images with contextual description'):
|
26 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
@@ -40,9 +40,8 @@ index= int(col1.number_input('Image Index from 0 to 9', value=0, min_value=0, ma
|
|
40 |
|
41 |
|
42 |
img = images[index]
|
43 |
-
|
44 |
|
45 |
col1.image(img, use_column_width=True)
|
46 |
caps = list(range(10))
|
47 |
-
caps[5] = "**5**"
|
48 |
col2.image(images, width=150, caption=caps)
|
|
|
20 |
st.set_page_config(layout="wide")
|
21 |
col1, col2 = st.columns(2)
|
22 |
|
23 |
+
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
24 |
|
25 |
if st.button('Sample set of images with contextual description'):
|
26 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
|
|
40 |
|
41 |
|
42 |
img = images[index]
|
43 |
+
images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=10,fill='blue')
|
44 |
|
45 |
col1.image(img, use_column_width=True)
|
46 |
caps = list(range(10))
|
|
|
47 |
col2.image(images, width=150, caption=caps)
|