Commit 78238f39 authored by liukaiwen's avatar liukaiwen

add table recognition and conversion to LaTeX

parent 3778cbc4
......@@ -6,10 +6,10 @@ class StructTableModel:
self.model_path = model_path
self.max_new_tokens = max_new_tokens # maximum output tokens length
self.max_time = max_time # timeout for processing in seconds
if device == 'cpu':
self.model = StructTable(self.model_path, self.max_new_tokens, self.max_time)
else:
if device == 'cuda':
self.model = StructTable(self.model_path, self.max_new_tokens, self.max_time).cuda()
else:
self.model = StructTable(self.model_path, self.max_new_tokens, self.max_time)
def image2latex(self, image) -> str:
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment