Spaces:
Sleeping
Sleeping
File size: 418 Bytes
5509100 6189582 15ddcaf 6189582 d4055fd 6189582 d4055fd 15ddcaf edb390c d4055fd 87723c9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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()
|