import gradio as gr import tensorflow as tf import numpy as np from huggingface_hub import from_pretrained_keras model = from_pretrained_keras("Hitomiblood/blindness_model_keras") def classify_image(image): image_array = np.array(image) / 255.0 # Normalización prediction = model.predict(image) return prediction image = gr.inputs.Image(shape=(512, 512)) label = gr.outputs.Label(num_top_classes=1) gr.Interface(fn=classify_image, inputs=image, outputs=label, capture_session=True, theme = "grass").launch()