Spaces:
Runtime error
Runtime error
fix pix2tikz
Browse files
webui.py
CHANGED
@@ -67,6 +67,7 @@ def pix2tikz(
|
|
67 |
args = Munch({'config': config_path,
|
68 |
'checkpoint': model_path,
|
69 |
'no_resize': False,
|
|
|
70 |
'temperature': temperature})
|
71 |
model = LatexOCR(args)
|
72 |
res = model(image)
|
@@ -84,7 +85,7 @@ def inference(
|
|
84 |
):
|
85 |
try:
|
86 |
image = image_dict['composite']
|
87 |
-
if
|
88 |
yield pix2tikz(model_name, image, temperature, top_p, top_k, expand_to_square)
|
89 |
return
|
90 |
|
|
|
67 |
args = Munch({'config': config_path,
|
68 |
'checkpoint': model_path,
|
69 |
'no_resize': False,
|
70 |
+
'no_cuda': False,
|
71 |
'temperature': temperature})
|
72 |
model = LatexOCR(args)
|
73 |
res = model(image)
|
|
|
85 |
):
|
86 |
try:
|
87 |
image = image_dict['composite']
|
88 |
+
if "pix2tikz" in model_name:
|
89 |
yield pix2tikz(model_name, image, temperature, top_p, top_k, expand_to_square)
|
90 |
return
|
91 |
|