ranbac commited on
Commit
f164e75
·
verified ·
1 Parent(s): fe3db8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,7 @@ os.environ["CPP_MIN_LOG_LEVEL"] = "3"
9
  import logging
10
  import re
11
  import gradio as gr
12
- from paddleocr import PaddleOCR-VL
13
  from PIL import Image, ImageDraw, ImageFont
14
  import numpy as np
15
  import requests
@@ -20,11 +20,11 @@ logging.getLogger("ppocr").setLevel(logging.WARNING)
20
  print("Đang khởi tạo PaddleOCR (Coordinate Sync Mode)...")
21
 
22
  try:
23
- ocr = PaddleOCR-VL(use_textline_orientation=False, use_doc_orientation_classify=False,
24
  use_doc_unwarping=False, lang='ch')
25
  except Exception as e:
26
  print(f"Lỗi khởi tạo: {e}. Chuyển về chế độ mặc định.")
27
- ocr = PaddleOCR-VL(lang='ch')
28
 
29
  print("Model đã sẵn sàng!")
30
 
 
9
  import logging
10
  import re
11
  import gradio as gr
12
+ from paddleocr import PaddleOCR
13
  from PIL import Image, ImageDraw, ImageFont
14
  import numpy as np
15
  import requests
 
20
  print("Đang khởi tạo PaddleOCR (Coordinate Sync Mode)...")
21
 
22
  try:
23
+ ocr = PaddleOCR(use_textline_orientation=False, use_doc_orientation_classify=False,
24
  use_doc_unwarping=False, lang='ch')
25
  except Exception as e:
26
  print(f"Lỗi khởi tạo: {e}. Chuyển về chế độ mặc định.")
27
+ ocr = PaddleOCR(lang='ch')
28
 
29
  print("Model đã sẵn sàng!")
30