Spaces:
Runtime error
Runtime error
333
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def greet(img):
|
|
12 |
a = numb % 3
|
13 |
return a, numb
|
14 |
|
15 |
-
def process_sketch(
|
16 |
img = np.expand_dims(img, axis=0)
|
17 |
output1 = np.argmax(model.predict(img)[0])
|
18 |
output2 = (np.argmax(model.predict(img)[0]) % 3)
|
@@ -22,9 +22,9 @@ def process_sketch(sketch):
|
|
22 |
#demo.launch()
|
23 |
|
24 |
iface = gr.Interface(
|
25 |
-
fn=
|
26 |
inputs="sketchpad",
|
27 |
-
outputs=["
|
28 |
layout="vertical",
|
29 |
title="Распознавание рисунка"
|
30 |
)
|
|
|
12 |
a = numb % 3
|
13 |
return a, numb
|
14 |
|
15 |
+
def process_sketch(img):
|
16 |
img = np.expand_dims(img, axis=0)
|
17 |
output1 = np.argmax(model.predict(img)[0])
|
18 |
output2 = (np.argmax(model.predict(img)[0]) % 3)
|
|
|
22 |
#demo.launch()
|
23 |
|
24 |
iface = gr.Interface(
|
25 |
+
fn=process_sketch,
|
26 |
inputs="sketchpad",
|
27 |
+
outputs=[gr.outputs.Text(label="Среднее"), gr.outputs.Text(label="Стандартное отклонение")],
|
28 |
layout="vertical",
|
29 |
title="Распознавание рисунка"
|
30 |
)
|