Spaces:
Runtime error
Runtime error
Commit
·
58bc1a3
1
Parent(s):
dd335bc
app.py
CHANGED
@@ -31,9 +31,13 @@ images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
|
31 |
img_urls = images.copy()
|
32 |
index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=9))
|
33 |
|
|
|
|
|
|
|
|
|
34 |
|
35 |
col1.markdown(f'**Description**:')
|
36 |
-
col1.markdown(descr)
|
37 |
|
38 |
img = images[index]
|
39 |
images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=20,fill='blue')
|
@@ -42,11 +46,6 @@ images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index]
|
|
42 |
caps = list(range(10))
|
43 |
cap = str(index)
|
44 |
|
45 |
-
if col1.button('Show groundtruth target image'):
|
46 |
-
st.session_state.show = True
|
47 |
-
if col1.button('Hide groundtruth target image'):
|
48 |
-
st.session_state.show = False
|
49 |
-
|
50 |
if st.session_state.show:
|
51 |
caps[idx] = f'{idx} (TARGET IMAGE)'
|
52 |
if idx == index:
|
|
|
31 |
img_urls = images.copy()
|
32 |
index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=9))
|
33 |
|
34 |
+
if col1.button('Reveal groundtruth image index (try to guess yourself first!)'):
|
35 |
+
st.session_state.show = True
|
36 |
+
if col1.button('Hide groundtruth image index'):
|
37 |
+
st.session_state.show = False
|
38 |
|
39 |
col1.markdown(f'**Description**:')
|
40 |
+
col1.markdown(f'**{descr}**')
|
41 |
|
42 |
img = images[index]
|
43 |
images[index] = ImageOps.expand(Image.open(io.BytesIO(requests.get(images[index], stream=True).content)),border=20,fill='blue')
|
|
|
46 |
caps = list(range(10))
|
47 |
cap = str(index)
|
48 |
|
|
|
|
|
|
|
|
|
|
|
49 |
if st.session_state.show:
|
50 |
caps[idx] = f'{idx} (TARGET IMAGE)'
|
51 |
if idx == index:
|