Spaces:
Runtime error
Runtime error
TakeshiSaito
commited on
Commit
•
dac00a9
1
Parent(s):
260bf3d
update
Browse files
app.py
CHANGED
@@ -49,11 +49,15 @@ def predict(image):
|
|
49 |
return predicted.item()
|
50 |
|
51 |
|
52 |
-
input_component = gr.Sketchpad(type='pil'
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
|
|
|
|
|
|
|
|
|
49 |
return predicted.item()
|
50 |
|
51 |
|
52 |
+
input_component = gr.Sketchpad(type='pil',
|
53 |
+
height=280,
|
54 |
+
width=280,
|
55 |
+
layers=False,
|
56 |
+
image_mode='L',
|
57 |
+
brush=gr.Brush(default_color='auto', color_mode='defaults'))
|
58 |
+
iface = gr.Interface(fn=predict,
|
59 |
+
inputs=input_component,
|
60 |
+
outputs="text",
|
61 |
+
live=True,
|
62 |
+
clear_btn=gr.ClearButton(visible=False))
|
63 |
+
iface.launch()
|