Spaces:
Runtime error
Runtime error
Commit
Β·
0507c14
1
Parent(s):
113ef27
add flags
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ from pix2tex import cli as pix2tex
|
|
9 |
model = pix2tex.LatexOCR()
|
10 |
|
11 |
|
12 |
-
def inference(
|
13 |
-
img = Image.open(input_image_path)
|
14 |
output = model(img)
|
15 |
print("Model output:", output)
|
16 |
return output
|
@@ -29,7 +29,7 @@ demo = gr.Interface(
|
|
29 |
description=description,
|
30 |
article=article,
|
31 |
inputs=gr.inputs.Image(
|
32 |
-
type="
|
33 |
),
|
34 |
outputs=gr.outputs.Textbox(type="text", label="Output: Converted LaTeX code."),
|
35 |
examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
|
|
|
9 |
model = pix2tex.LatexOCR()
|
10 |
|
11 |
|
12 |
+
def inference(img):
|
13 |
+
#img = Image.open(input_image_path)
|
14 |
output = model(img)
|
15 |
print("Model output:", output)
|
16 |
return output
|
|
|
29 |
description=description,
|
30 |
article=article,
|
31 |
inputs=gr.inputs.Image(
|
32 |
+
type="pil", label="Input: Image of your equation you want to covert."
|
33 |
),
|
34 |
outputs=gr.outputs.Textbox(type="text", label="Output: Converted LaTeX code."),
|
35 |
examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
|