marrtinagg commited on
Commit
05e999d
·
1 Parent(s): f1268bc
Files changed (2) hide show
  1. app.py +27 -0
  2. requirements.txt +4 -0
app.py ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import tensorflow as tf
3
+ from huggingface_hub import hf_hub_download
4
+
5
+ def check_model():
6
+ try:
7
+ # 📥 descargamos el archivo simpleNet.h5 desde el repo del modelo
8
+ model_path = hf_hub_download(repo_id="Martinagg/simpleNet", filename="simpleNet.h5")
9
+
10
+ # 🔄 cargamos el modelo
11
+ model = tf.keras.models.load_model(model_path)
12
+
13
+ return "✅ Modelo cargado correctamente desde Hugging Face"
14
+ except Exception as e:
15
+ return f"❌ Error cargando modelo: {str(e)}"
16
+
17
+ # 🎛️ Interfaz Gradio simple (solo un botón)
18
+ demo = gr.Interface(
19
+ fn=check_model,
20
+ inputs=None,
21
+ outputs="text",
22
+ title="Prueba de carga - simpleNet",
23
+ description="Este Space solo verifica que el modelo simpleNet se carga desde Hugging Face."
24
+ )
25
+
26
+ if __name__ == "__main__":
27
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ gradio
2
+ tensorflow
3
+ huggingface_hub
4
+ numpy