Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from
|
| 3 |
|
| 4 |
-
# Carga del modelo
|
| 5 |
-
learn =
|
| 6 |
labels = learn.dls.vocab
|
| 7 |
|
| 8 |
# Función de predicción
|
|
@@ -27,4 +27,4 @@ app = gr.Interface(
|
|
| 27 |
)
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
-
app.launch(server_name="0.0.0.0", server_port=7860)
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from huggingface_hub import from_pretrained_fastai
|
| 3 |
|
| 4 |
+
# Carga del modelo desde HuggingFace Hub
|
| 5 |
+
learn = from_pretrained_fastai("ivferns/futurama")
|
| 6 |
labels = learn.dls.vocab
|
| 7 |
|
| 8 |
# Función de predicción
|
|
|
|
| 27 |
)
|
| 28 |
|
| 29 |
if __name__ == "__main__":
|
| 30 |
+
app.launch(server_name="0.0.0.0", server_port=7860)
|