Spaces:
Runtime error
Runtime error
Commit
Β·
032a15a
1
Parent(s):
f83e60a
add files
Browse files
app.py
CHANGED
@@ -16,7 +16,7 @@ def inference(input_image_path):
|
|
16 |
img = Image.open(input_image_path)
|
17 |
output = model(img)
|
18 |
print("Model output:",output)
|
19 |
-
return
|
20 |
|
21 |
|
22 |
# Front end
|
@@ -26,7 +26,7 @@ article = "<p style='text-align: center'><a href='https://lukas-blecher.github.i
|
|
26 |
|
27 |
|
28 |
# UI
|
29 |
-
gr.Interface(
|
30 |
inference,
|
31 |
title=title,
|
32 |
description=description,
|
@@ -34,6 +34,6 @@ gr.Interface(
|
|
34 |
inputs=gr.inputs.Image(type="filepath", label="Input: Image of your equation you want to covert."),
|
35 |
outputs=gr.outputs.Textbox(type="text", label="Output: Converted LaTeX code."),
|
36 |
examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
16 |
img = Image.open(input_image_path)
|
17 |
output = model(img)
|
18 |
print("Model output:",output)
|
19 |
+
return input_image_path
|
20 |
|
21 |
|
22 |
# Front end
|
|
|
26 |
|
27 |
|
28 |
# UI
|
29 |
+
demo = gr.Interface(
|
30 |
inference,
|
31 |
title=title,
|
32 |
description=description,
|
|
|
34 |
inputs=gr.inputs.Image(type="filepath", label="Input: Image of your equation you want to covert."),
|
35 |
outputs=gr.outputs.Textbox(type="text", label="Output: Converted LaTeX code."),
|
36 |
examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
|
37 |
+
)
|
38 |
+
|
39 |
+
demo.launch()
|