Spaces:
No application file
No application file
Update app.py
Browse files5 unmodified lines67891091011121415131415165 unmodified lineslogging.set_verbosity_error()
import warningswarnings.filterwarnings("ignore", message="Using the model-agnostic default `max_length`")warnings.filterwarnings("ignore",message="Using the model-agnostic default `max_length`")import osimport gradio as grfrom transformers import pipelinepipe = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")pipe = pipeline("image-to-text,model="Salesforce/blip-image-captioning-base")def launch(input): out = pipe(input) return out[0]['generated_text']app.py+2-4