Spaces:
Runtime error
Runtime error
Fix use_angle_cls deprecation warning by using use_textline_orientation
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ This demo uses PaddleOCR instead, which works on CPU.
|
|
| 17 |
@st.cache_resource
|
| 18 |
def load_ocr():
|
| 19 |
try:
|
| 20 |
-
ocr = PaddleOCR(
|
| 21 |
return ocr
|
| 22 |
except Exception as e:
|
| 23 |
st.error(f"Error loading OCR: {e}")
|
|
|
|
| 17 |
@st.cache_resource
|
| 18 |
def load_ocr():
|
| 19 |
try:
|
| 20 |
+
ocr = PaddleOCR(use_textline_orientation=True, lang='en', use_gpu=False)
|
| 21 |
return ocr
|
| 22 |
except Exception as e:
|
| 23 |
st.error(f"Error loading OCR: {e}")
|