Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,8 @@ pipeline =pipeline("image-classification",model="p1atdev/siglip-tagger-test-3",t
|
|
5 |
|
6 |
def predict(input_img):
|
7 |
predictions = pipeline(input_img , threshold=0.5, #optional parameter defaults to 0
|
8 |
-
return_scores = False #optional parameter defaults to False
|
|
|
9 |
return input_img, {p["label"]: p["score"] for p in predictions}
|
10 |
|
11 |
gradio_app = gr.Interface(
|
|
|
5 |
|
6 |
def predict(input_img):
|
7 |
predictions = pipeline(input_img , threshold=0.5, #optional parameter defaults to 0
|
8 |
+
return_scores = False #optional parameter defaults to False
|
9 |
+
)
|
10 |
return input_img, {p["label"]: p["score"] for p in predictions}
|
11 |
|
12 |
gradio_app = gr.Interface(
|