BennoKrojer commited on
Commit
869dab3
1 Parent(s): 7c364f1

load image list

Browse files
Files changed (1) hide show
  1. app.py +8 -16
app.py CHANGED
@@ -6,25 +6,17 @@ import json
6
  prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/image-sets-val/'
7
  set2ids = json.load(open('set2ids.json', 'r'))
8
 
9
- # st.image(prefix + 'MSR-VTT-videoTestVideo_video7016-shot1_2/img224.jpg', use_column_width=True)
10
-
11
-
12
  images = set2ids['MSR-VTT-videoTestVideo_video7016-shot1_2']
13
- st.text(images)
14
-
15
- # index= st.number_input('Index')
16
-
17
- # if st.button('Next'):
18
- # index+=1
19
 
 
20
 
21
- # if st.button('Prev'):
22
- # if index > 0:
23
- # index = index -1
24
 
25
- # image = Image.open(images[index])
26
- # st.image(image, use_column_width=True)
27
 
 
 
 
28
 
29
- # x = st.slider('Select a value')
30
- # st.write(x, 'squared is', x * x)
 
6
  prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/image-sets-val/'
7
  set2ids = json.load(open('set2ids.json', 'r'))
8
 
 
 
 
9
  images = set2ids['MSR-VTT-videoTestVideo_video7016-shot1_2']
 
 
 
 
 
 
10
 
11
+ index= st.number_input('Index')
12
 
13
+ if st.button('Next'):
14
+ index+=1
 
15
 
 
 
16
 
17
+ if st.button('Prev'):
18
+ if index > 0:
19
+ index = index -1
20
 
21
+ image = Image.open(images[index])
22
+ st.image(image, use_column_width=True)