Spaces:
Runtime error
Runtime error
BennoKrojer
commited on
Commit
•
189516e
1
Parent(s):
5e188c5
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/i
|
|
24 |
set2ids = json.load(open('set2ids.json', 'r'))
|
25 |
descriptions = json.load(open('valid_list.json', 'r'))
|
26 |
|
27 |
-
#
|
28 |
if col1.button('Sample an example (description + corresponding images) from the validation set'):
|
29 |
st.session_state.example_idx += 1
|
30 |
# st.session_state.example_idx = random.randint(0, len(descriptions)-1)
|
@@ -38,7 +38,7 @@ index = int(col2.number_input('Image Index from 0 to 9', value=0, min_value=0, m
|
|
38 |
if col1.button('Click to reveal/hide groundtruth image index (try to guess yourself first!)'):
|
39 |
st.session_state.show = not st.session_state.show
|
40 |
|
41 |
-
|
42 |
col1.markdown(f'**{descr}**')
|
43 |
|
44 |
big_img = images[index]
|
|
|
24 |
set2ids = json.load(open('set2ids.json', 'r'))
|
25 |
descriptions = json.load(open('valid_list.json', 'r'))
|
26 |
|
27 |
+
#example_idx = int(col1.number_input('Sample an example (description + corresponding images) from the validation set', value=0, min_value=0, max_value=len(descriptions)-1))
|
28 |
if col1.button('Sample an example (description + corresponding images) from the validation set'):
|
29 |
st.session_state.example_idx += 1
|
30 |
# st.session_state.example_idx = random.randint(0, len(descriptions)-1)
|
|
|
38 |
if col1.button('Click to reveal/hide groundtruth image index (try to guess yourself first!)'):
|
39 |
st.session_state.show = not st.session_state.show
|
40 |
|
41 |
+
col1.markdown(f'**Description for {img_set}**:')
|
42 |
col1.markdown(f'**{descr}**')
|
43 |
|
44 |
big_img = images[index]
|