imagecode-demo / app.py
BennoKrojer's picture
x
0b7b279
raw
history blame
576 Bytes
import streamlit as st
from PIL import Image
import glob
import json
prefix = 'https://raw.githubusercontent.com/BennoKrojer/imagecode-val-set/main/image-sets-val/'
set2ids = json.load(open('set2ids.json', 'r'))
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(st.number_input('Image Index from 0 to 9', value=0, min_value=0, max_value=len(images)-1))
col1.image(images[index], use_column_width=True)
col2.image(images, width=100, caption=list(range(10)))