Spaces:
Runtime error
Runtime error
ShreyMehra commited on
Update app.py
Browse files13 unmodified lines141516171819204 unmodified lines25262727282829303129303113 unmodified lines#image uploaderimage = st.file_uploader(label = "Upload your image here",type=['png','jpg','jpeg'])
@st.cache_datadef load_model(): peft_model_id = "Shrey23/Image-Captioning" config = PeftConfig.from_pretrained(peft_model_id)4 unmodified lines return processor, model
if "dict" not in st.session_state: processor, model = load_model() #load modelprocessor, model = load_model() #load model st.session_state.dict = {} st.session_state.dict['processor'] = processor st.session_state.dict['model'] = model
app.py+2-5