Spaces:
Runtime error
Runtime error
Commit
Β·
71f4d23
1
Parent(s):
4c31e3f
add files
Browse files
app.py
CHANGED
@@ -9,13 +9,11 @@ os.system("pip install pix2tex")
|
|
9 |
from pix2tex import cli as pix2tex
|
10 |
|
11 |
model = pix2tex.LatexOCR()
|
12 |
-
print(model)
|
13 |
-
|
14 |
|
15 |
def inference(input_image):
|
16 |
# img = Image.open(input_image_path)
|
17 |
output = model(input_image)
|
18 |
-
|
19 |
return output
|
20 |
|
21 |
|
@@ -38,4 +36,4 @@ demo = gr.Interface(
|
|
38 |
examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
|
39 |
)
|
40 |
|
41 |
-
demo.launch()
|
|
|
9 |
from pix2tex import cli as pix2tex
|
10 |
|
11 |
model = pix2tex.LatexOCR()
|
|
|
|
|
12 |
|
13 |
def inference(input_image):
|
14 |
# img = Image.open(input_image_path)
|
15 |
output = model(input_image)
|
16 |
+
print("Model output:", output)
|
17 |
return output
|
18 |
|
19 |
|
|
|
36 |
examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
|
37 |
)
|
38 |
|
39 |
+
demo.launch(enable_queue=True)
|