adithya12's picture
Update app.py
8efa671
raw
history blame
413 Bytes
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")