Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr]
|
2 |
+
import pickle
|
3 |
+
import numpy as np
|
4 |
+
model = pickle.load(open("model.pkl","rb"))
|
5 |
+
|
6 |
+
def predict_v(input_value):
|
7 |
+
try:
|
8 |
+
if input_value == None: pass
|
9 |
+
except:
|
10 |
+
return np.argmax(input_value / 255.)
|
11 |
+
gr.Interface(fn=predict_v,
|
12 |
+
inputs = gr.SketchPad(),
|
13 |
+
outputs="number").launch()
|