Spaces:
Runtime error
Runtime error
File size: 519 Bytes
4c7541d 3883b5b 4c7541d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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() |