waleko commited on
Commit
1ea18f2
1 Parent(s): 4ffdab4

fix pix2tikz

Browse files
Files changed (1) hide show
  1. webui.py +2 -1
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 model_name == "pix2tikz":
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