imagecode-demo / app.py
BennoKrojer's picture
load image list
869dab3
raw
history blame
485 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'))
images = set2ids['MSR-VTT-videoTestVideo_video7016-shot1_2']
index= st.number_input('Index')
if st.button('Next'):
index+=1
if st.button('Prev'):
if index > 0:
index = index -1
image = Image.open(images[index])
st.image(image, use_column_width=True)