Spaces:
Sleeping
Sleeping
Commit
·
0114d4f
1
Parent(s):
111f215
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ choices = gr.inputs.Dropdown(choices=models, default='flyswot/convnext-tiny-224_
|
|
| 12 |
|
| 13 |
def predict(image,model):
|
| 14 |
pipe = pipeline("image-classification", model=model)
|
| 15 |
-
predictions = pipe(image)
|
| 16 |
return {pred['label']: pred['score'] for pred in predictions}
|
| 17 |
|
| 18 |
iface = gr.Interface(
|
|
|
|
| 12 |
|
| 13 |
def predict(image,model):
|
| 14 |
pipe = pipeline("image-classification", model=model)
|
| 15 |
+
predictions = pipe(image, top_k=20)
|
| 16 |
return {pred['label']: pred['score'] for pred in predictions}
|
| 17 |
|
| 18 |
iface = gr.Interface(
|