Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ except ImportError:
|
|
| 11 |
|
| 12 |
|
| 13 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
| 14 |
-
repo_id = "maviced/
|
| 15 |
|
| 16 |
learner = from_pretrained_fastai(repo_id)
|
| 17 |
labels = learner.dls.vocab
|
|
@@ -23,4 +23,4 @@ def predict(img):
|
|
| 23 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 24 |
|
| 25 |
# Creamos la interfaz y la lanzamos.
|
| 26 |
-
gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(128, 128)), outputs=gr.outputs.Label(num_top_classes=3),examples=['
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
# repo_id = "YOUR_USERNAME/YOUR_LEARNER_NAME"
|
| 14 |
+
repo_id = "maviced/practica3"
|
| 15 |
|
| 16 |
learner = from_pretrained_fastai(repo_id)
|
| 17 |
labels = learner.dls.vocab
|
|
|
|
| 23 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 24 |
|
| 25 |
# Creamos la interfaz y la lanzamos.
|
| 26 |
+
gr.Interface(fn=predict, inputs=gr.inputs.Image(shape=(128, 128)), outputs=gr.outputs.Label(num_top_classes=3),examples=['color_155.jpg','color_154.jpg']).launch(share=False)
|