Spaces:
Runtime error
Runtime error
Rizki Imam Andreas commited on
Commit ·
3579e26
1
Parent(s): 753f453
initial commit
Browse filesFiles changed (2)
- app.pyAdded+16
- requirements.txtAdded+2
12345678910111213141516import gradio as grfrom transformers import pipeline
pipeline = pipeline(task="image-classification", model="rizkiandreas/foody-images")
def predict(image): predictions = pipeline(image) return {p["label"]: p["score"] for p in predictions}
gr.Interface( predict, inputs=gr.inputs.Image(label="Upload hot dog candidate", type="filepath"), outputs=gr.outputs.Label(num_top_classes=2), title="Hot Dog? Or Not?", allow_flagging="manual").launch()12transformerstorchapp.pyAdded+16
requirements.txtAdded+2