Spaces:
Runtime error
Runtime error
import gradio as gr | |
import pickle | |
import numpy as np | |
from modelutil import create_model | |
def test(k): | |
try: | |
if k == None: | |
pass | |
except: | |
print(k.shape) | |
k = k / 255. | |
model = create_model() | |
return np.argmax(model.predict(k.reshape(-1,28,28))) | |
gr.Interface(inputs=gr.Sketchpad(), | |
outputs="number", | |
fn=test, | |
live=True).launch() | |