Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
sunprizrak committed Aug 10, 2023
1 parent 9d0e59c commit de23a04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def reform(self, data: list):

res[-1] = res[-1].replace(',', '')

res.insert(0, self.path)
res.insert(0, getattr(self, 'path'))

now = datetime.datetime.now()
date = now.strftime("%d/%m")
Expand All @@ -76,6 +76,7 @@ def main(self, file_path: str):
paddle_ocr = PaddleOCR(use_angle_cls=True, show_log=False)
image_data = paddle_ocr.ocr(file_path)
reform_data = self.reform(image_data)
print(f'main: {reform_data}')
return reform_data

def __call__(self, path: str):
Expand Down
1 change: 1 addition & 0 deletions screens.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def _callback(response, spin: bool):
button.text = 'Start'
button.md_bg_color = 'green'
self.ids.main_spin.active = False
print(f'response: {response}')
self.table.add_row(data_image=response)

if os.path.isfile(self.path):
Expand Down

0 comments on commit de23a04

Please sign in to comment.