Spaces:
Sleeping
Sleeping
| import numpy as np | |
| import keras | |
| import gradio as gr | |
| from huggingface_hub import from_pretrained_keras | |
| model = from_pretrained_keras("Andysoeasy/digit_defines") | |
| # | |
| def greet(img): | |
| img = np.expand_dims(img, axis = 0) | |
| return np.argmax(model.predict(img)[0]) | |
| demo = gr.Interface(fn = greet, | |
| inputs = 'sketchpad', | |
| outputs = 'text') | |
| demo.launch() |