Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
import pickle
|
3 |
import numpy as np
|
|
|
4 |
|
5 |
def test(k):
|
6 |
try:
|
@@ -9,6 +10,7 @@ def test(k):
|
|
9 |
except:
|
10 |
print(k.shape)
|
11 |
k = k / 255.
|
|
|
12 |
return np.argmax(model.predict(k))
|
13 |
gr.Interface(inputs=gr.Sketchpad(),
|
14 |
outputs="number",
|
|
|
1 |
import gradio as gr
|
2 |
import pickle
|
3 |
import numpy as np
|
4 |
+
from modelutil import create_model
|
5 |
|
6 |
def test(k):
|
7 |
try:
|
|
|
10 |
except:
|
11 |
print(k.shape)
|
12 |
k = k / 255.
|
13 |
+
model = create_model()
|
14 |
return np.argmax(model.predict(k))
|
15 |
gr.Interface(inputs=gr.Sketchpad(),
|
16 |
outputs="number",
|