mirror of
https://github.com/VikParuchuri/surya.git
synced 2026-06-12 21:02:45 +08:00
Update tqdm desc string based on founation model mode
Some checks failed
Integration test / build (push) Has been cancelled
Unit tests / build (t4_gpu) (push) Has been cancelled
Unit tests / build (ubuntu-latest) (push) Has been cancelled
Unit tests / build (windows-latest) (push) Has been cancelled
Test CLI scripts / build (push) Has been cancelled
Some checks failed
Integration test / build (push) Has been cancelled
Unit tests / build (t4_gpu) (push) Has been cancelled
Unit tests / build (ubuntu-latest) (push) Has been cancelled
Unit tests / build (windows-latest) (push) Has been cancelled
Test CLI scripts / build (push) Has been cancelled
This commit is contained in:
parent
9ab25b3ede
commit
42e016f49c
@ -723,6 +723,7 @@ class FoundationPredictor(BasePredictor):
|
||||
drop_repeated_tokens: bool = True,
|
||||
max_lookahead_tokens: Optional[int] = None,
|
||||
top_k: int = 0,
|
||||
tqdm_desc: str = "Recognizing Text"
|
||||
) -> tuple:
|
||||
allowed_tasks = self.tasks.keys()
|
||||
assert all([task_name in allowed_tasks for task_name in task_names]), (
|
||||
@ -765,7 +766,7 @@ class FoundationPredictor(BasePredictor):
|
||||
|
||||
pbar = tqdm(
|
||||
total=len(self.prompt_queue),
|
||||
desc="Recognizing Text",
|
||||
desc=tqdm_desc,
|
||||
disable=self.disable_tqdm,
|
||||
)
|
||||
|
||||
|
||||
@ -53,7 +53,8 @@ class LayoutPredictor(BasePredictor):
|
||||
max_lookahead_tokens=0, # Do not do MTP for layout
|
||||
top_k=5,
|
||||
max_sliding_window=576,
|
||||
max_tokens=500
|
||||
max_tokens=500,
|
||||
tqdm_desc="Recognizing Layout"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@ -438,6 +438,7 @@ class RecognitionPredictor(BasePredictor):
|
||||
max_lookahead_tokens=self.foundation_predictor.model.config.multi_output_distance,
|
||||
max_sliding_window=max_sliding_window,
|
||||
max_tokens=max_tokens,
|
||||
tqdm_desc="Recognizing Text"
|
||||
)
|
||||
|
||||
# Get text and bboxes in structured form
|
||||
|
||||
Loading…
Reference in New Issue
Block a user