Spaces:
Sleeping
Sleeping
File size: 347 Bytes
09489a7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
from transformers import pipeline
import gradio as gr
pipe = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base")
def genetreted_caption(images):
result= pipe(images)
return result[0]['generated_text']
interface= gr.Interface(genetreted_caption,inputs =gr.Image(type="pil"),outputs="text")
interface.launch(share=True)
|