Zemog13 commited on
Commit
75d96f1
verified
1 Parent(s): 80c202d

Delete Model

Browse files
Files changed (1) hide show
  1. Model +0 -17
Model DELETED
@@ -1,17 +0,0 @@
1
- from fastai.vision.all import load_learner
2
- from huggingface_hub import hf_hub_download
3
-
4
- # Descarga el modelo desde Hugging Face
5
- model_path = hf_hub_download(repo_id="Zemog13/gradio-test", filename="export.pkl")
6
- learn = load_learner(model_path)
7
-
8
- # Aqu铆 puedes a帽adir c贸mo usar el modelo, por ejemplo, con Gradio
9
- import gradio as gr
10
-
11
- def predict(image):
12
- pred, _, probs = learn.predict(image)
13
- return {learn.dls.vocab[i]: float(probs[i]) for i in range(len(probs))}
14
-
15
- # Interfaz de Gradio
16
- demo = gr.Interface(fn=predict, inputs="image", outputs="label")
17
- demo.launch()