Spaces:
Runtime error
Runtime error
| from huggingface_hub import from_pretrained_keras | |
| import gradio as gr | |
| import tensorflow as tf | |
| import numpy as np | |
| m = from_pretrained_keras('adithya12/monkeypox-model-lin') | |
| def predict(inp): | |
| prediction = m.predict(np.array([tf.keras.preprocessing.image.img_to_array(inp)]) ) | |
| return (1-prediction)*100 | |
| gr.Interface(fn=predict,inputs=gr.Image(shape=(224, 224)),outputs=gr.Number()).launch(server_name="0.0.0.0") |