Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
title = "Image Classifier" | |
description = "This machine has vision. It can identify objects and concepts in an image. To test the machine, upload or drop an image, submit and read the results. The results comprise a list of words that the machine sees in the image. Besides a word, the length of the bar indicates the confidence with which the machine sees the word. The longer the bar, the more confident the machine is." | |
pipe = pipeline(task="image-classification", | |
model="microsoft/beit-base-patch16-224-pt22k-ft22k") | |
gr.Interface.from_pipeline(pipe, | |
title=title, | |
description=description, | |
enable_queue=True, | |
).launch() |