imagecode-demo / app.py
BennoKrojer's picture
load image list
7c364f1
raw
history blame
687 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'))
# st.image(prefix + 'MSR-VTT-videoTestVideo_video7016-shot1_2/img224.jpg', use_column_width=True)
images = set2ids['MSR-VTT-videoTestVideo_video7016-shot1_2']
st.text(images)
# 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)
# x = st.slider('Select a value')
# st.write(x, 'squared is', x * x)