Wootang01's picture
Update app.py
4b83c68
raw
history blame contribute delete
796 Bytes
import gradio as gr
from transformers import pipeline
title = "Image Classifier"
description = "This machine has vision. It can see 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. Beside 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()