Spaces:
Runtime error
Runtime error
BennoKrojer
commited on
Commit
•
45781ff
1
Parent(s):
6115563
app.py
CHANGED
@@ -14,7 +14,7 @@ def sample():
|
|
14 |
|
15 |
prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/image-sets-val/'
|
16 |
set2ids = json.load(open('set2ids.json', 'r'))
|
17 |
-
img_set =
|
18 |
|
19 |
|
20 |
st.set_page_config(layout="wide")
|
@@ -22,7 +22,9 @@ col1, col2 = st.columns(2)
|
|
22 |
|
23 |
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
24 |
|
25 |
-
|
|
|
|
|
26 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
27 |
|
28 |
index= int(col1.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
|
|
|
14 |
|
15 |
prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/image-sets-val/'
|
16 |
set2ids = json.load(open('set2ids.json', 'r'))
|
17 |
+
img_set = 'YouCook-video0034-shot13_0'
|
18 |
|
19 |
|
20 |
st.set_page_config(layout="wide")
|
|
|
22 |
|
23 |
images = [prefix+'/'+img_set+'/'+i for i in set2ids[img_set]]
|
24 |
|
25 |
+
sample_button = st.button('Sample set of images with contextual description')
|
26 |
+
|
27 |
+
if sample_button:
|
28 |
img_set = random.sample(list(set2ids.keys()),1)[0]
|
29 |
|
30 |
index= int(col1.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
|