Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,7 +31,7 @@ def get_result(pred):
|
|
| 31 |
last = char_ind
|
| 32 |
answ = "".join(ans)[:max_length]
|
| 33 |
return answ, accuracy
|
| 34 |
-
def predict(
|
| 35 |
img = Image.open(io.BytesIO(svg2png(svgdata)))
|
| 36 |
img = img.convert('L')
|
| 37 |
img = img.resize((img_width, img_height))
|
|
@@ -50,6 +50,5 @@ iface = gr.Interface(fn=predict,
|
|
| 50 |
inputs=gr.Textbox(),
|
| 51 |
outputs=gr.Textbox(),
|
| 52 |
title=title,
|
| 53 |
-
examples=glob.glob('examples/*.png'),
|
| 54 |
description=description)
|
| 55 |
iface.launch()
|
|
|
|
| 31 |
last = char_ind
|
| 32 |
answ = "".join(ans)[:max_length]
|
| 33 |
return answ, accuracy
|
| 34 |
+
def predict(svgdata):
|
| 35 |
img = Image.open(io.BytesIO(svg2png(svgdata)))
|
| 36 |
img = img.convert('L')
|
| 37 |
img = img.resize((img_width, img_height))
|
|
|
|
| 50 |
inputs=gr.Textbox(),
|
| 51 |
outputs=gr.Textbox(),
|
| 52 |
title=title,
|
|
|
|
| 53 |
description=description)
|
| 54 |
iface.launch()
|