Spaces:
Runtime error
Runtime error
Commit
Β·
80d5977
1
Parent(s):
032a15a
add files
Browse files
app.py
CHANGED
@@ -1,21 +1,20 @@
|
|
1 |
import os
|
2 |
-
import PIL
|
3 |
import gradio as gr
|
4 |
from PIL import Image
|
5 |
|
6 |
-
os.system("pip install pix2tex")
|
7 |
os.system("pip install opencv-python-headless==4.1.2.30")
|
8 |
|
9 |
# Load model
|
10 |
-
from pix2tex import cli as pix2tex
|
11 |
|
12 |
-
model = pix2tex.LatexOCR()
|
13 |
|
14 |
|
15 |
def inference(input_image_path):
|
16 |
img = Image.open(input_image_path)
|
17 |
-
output = model(img)
|
18 |
-
print("Model output:",output)
|
19 |
return input_image_path
|
20 |
|
21 |
|
|
|
1 |
import os
|
|
|
2 |
import gradio as gr
|
3 |
from PIL import Image
|
4 |
|
5 |
+
#os.system("pip install pix2tex")
|
6 |
os.system("pip install opencv-python-headless==4.1.2.30")
|
7 |
|
8 |
# Load model
|
9 |
+
#from pix2tex import cli as pix2tex
|
10 |
|
11 |
+
#model = pix2tex.LatexOCR()
|
12 |
|
13 |
|
14 |
def inference(input_image_path):
|
15 |
img = Image.open(input_image_path)
|
16 |
+
#output = model(img)
|
17 |
+
#print("Model output:",output)
|
18 |
return input_image_path
|
19 |
|
20 |
|