Spaces:
Runtime error
Runtime error
fix pix2tikz
Browse files
webui.py
CHANGED
@@ -58,8 +58,14 @@ def pix2tikz(
|
|
58 |
__: int,
|
59 |
___: bool,
|
60 |
):
|
61 |
-
|
62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
'no_resize': False,
|
64 |
'temperature': temperature})
|
65 |
model = LatexOCR(args)
|
|
|
58 |
__: int,
|
59 |
___: bool,
|
60 |
):
|
61 |
+
cur_pwd = os.path.dirname(os.path.abspath(__file__))
|
62 |
+
config_path = os.path.join(cur_pwd, 'pix2tikz/config.yaml')
|
63 |
+
model_path = os.path.join(cur_pwd, checkpoint)
|
64 |
+
|
65 |
+
print(cur_pwd, config_path, model_path, os.path.exists(config_path), os.path.exists(model_path))
|
66 |
+
|
67 |
+
args = Munch({'config': config_path,
|
68 |
+
'checkpoint': model_path,
|
69 |
'no_resize': False,
|
70 |
'temperature': temperature})
|
71 |
model = LatexOCR(args)
|