I am trying to upload an app to the streamlit cloud. However, I get the following error “Streamlit server consistently failed status checks”. Code seems to be fine. I am afraid the model run requrires too many resources. Is there a way to monitor the consumption of the resources and the reduction that has to be made, in case that this is the reason for the issue?
# Import necessary libraries
import streamlit as st
from PIL import Image
import requests
from io import BytesIO
from transformers import BlipProcessor, BlipForConditionalGeneration
# Create a Streamlit app title and description
st.title("Image Captioning with Transformers")
st.write("Upload an image or use the default image to generate image captions.")
# Load pre-trained models
st.write("Loading pre-trained models...")
processor = BlipProcessor.from_pretrained("Salesforce/blip-image-captioning-large")
model = BlipForConditionalGeneration.from_pretrained("Salesforce/blip-image-captioning-large")
st.write("Models loaded successfully.")
# Add a file uploader widget for image input
st.write("Waiting for image upload...")
uploaded_image = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
This file has been truncated. show original
Hey @Octavio_Mesa_Varona ,
Thanks for sharing your question! Can you please share the link to the deployed app?
system
Closed
April 2, 2024, 1:05pm
3
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.