Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,7 @@ from transformers import pipeline
|
|
| 3 |
pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
|
| 4 |
|
| 5 |
def predict(input_img):
|
| 6 |
-
predictions =
|
| 7 |
return input_img, {p["label"]: p["score"] for p in predictions}
|
| 8 |
|
| 9 |
gradio_app = gr.Interface(
|
|
@@ -13,5 +13,5 @@ gradio_app = gr.Interface(
|
|
| 13 |
title = "Hot Dog? Or Not?"
|
| 14 |
)
|
| 15 |
|
| 16 |
-
if
|
| 17 |
gradio_app.launch()
|
|
|
|
| 3 |
pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
|
| 4 |
|
| 5 |
def predict(input_img):
|
| 6 |
+
predictions = pipeline(input_img)
|
| 7 |
return input_img, {p["label"]: p["score"] for p in predictions}
|
| 8 |
|
| 9 |
gradio_app = gr.Interface(
|
|
|
|
| 13 |
title = "Hot Dog? Or Not?"
|
| 14 |
)
|
| 15 |
|
| 16 |
+
if _main_=="_main_":
|
| 17 |
gradio_app.launch()
|