Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,8 @@ from huggingface_hub import from_pretrained_fastai
|
|
| 2 |
import gradio as gr
|
| 3 |
from fastai.vision.all import *
|
| 4 |
|
|
|
|
|
|
|
| 5 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
| 6 |
repo_id = "jumava/prueba-practica1"
|
| 7 |
|
|
@@ -15,9 +17,7 @@ def predict(img):
|
|
| 15 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 16 |
|
| 17 |
# Creamos la interfaz y la lanzamos.
|
| 18 |
-
gr.Interface(fn=predict, inputs=gr.
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
-
|
| 23 |
-
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
from fastai.vision.all import *
|
| 4 |
|
| 5 |
+
|
| 6 |
+
|
| 7 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
| 8 |
repo_id = "jumava/prueba-practica1"
|
| 9 |
|
|
|
|
| 17 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 18 |
|
| 19 |
# Creamos la interfaz y la lanzamos.
|
| 20 |
+
gr.Interface(fn=predict, inputs=gr.Image(), outputs=gr.Label(num_top_classes=3),examples=['20098.jpg','20195.jpg']).launch(share=False)
|
| 21 |
|
| 22 |
|
| 23 |
|
|
|
|
|
|