File size: 413 Bytes
8efa671
f40a280
8efa671
f40a280
8efa671
 
f40a280
8efa671
f40a280
8efa671
1
2
3
4
5
6
7
8
9
10
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")