File size: 684 Bytes
e15dae8
c9911aa
17bb1f6
 
e15dae8
62635cf
17bb1f6
62635cf
a19e716
0b7b279
 
6be8cad
62635cf
a19e716
62635cf
c9911aa
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import streamlit as st
from PIL import Image, ImageOps
import glob
import json

prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/image-sets-val/'
set2ids = json.load(open('set2ids.json', 'r'))

st.set_page_config(layout="wide")
col1, col2 = st.columns(2)

images = [prefix+'/MSR-VTT-videoTestVideo_video7016-shot1_2/'+i for i in set2ids['MSR-VTT-videoTestVideo_video7016-shot1_2']]

index= int(col1.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))

img = ImageOps.expand(Image.open(images[index]),border=50,fill='blue')

col1.image(img, use_column_width=True)
col2.image(images, width=175, caption=list(range(10)))