Hi there,
When I tried to run surya_gui, i got the below error:
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.dict)
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/ocr_app.py", line 6, in
from surya.detection import batch_text_detection
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/detection.py", line 8, in
from surya.postprocessing.heatmap import get_and_clean_boxes
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/postprocessing/heatmap.py", line 10, in
from surya.schema import PolygonBox
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 141, in
class OCRResult(BaseModel):
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 143, in OCRResult
languages: List[str] | None = None
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
2024-08-21 15:37:38.721 Uncaught app exception
Traceback (most recent call last):
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.dict)
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/ocr_app.py", line 6, in
from surya.detection import batch_text_detection
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/detection.py", line 8, in
from surya.postprocessing.heatmap import get_and_clean_boxes
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/postprocessing/heatmap.py", line 10, in
from surya.schema import PolygonBox
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 141, in
class OCRResult(BaseModel):
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 143, in OCRResult
languages: List[str] | None = None
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
Hi there, When I tried to run surya_gui, i got the below error:
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling result = func() File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec exec(code, module.dict) File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/ocr_app.py", line 6, in
from surya.detection import batch_text_detection
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/detection.py", line 8, in
from surya.postprocessing.heatmap import get_and_clean_boxes
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/postprocessing/heatmap.py", line 10, in
from surya.schema import PolygonBox
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 141, in
class OCRResult(BaseModel):
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 143, in OCRResult
languages: List[str] | None = None
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
2024-08-21 15:37:38.721 Uncaught app exception
Traceback (most recent call last):
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/exec_code.py", line 85, in exec_func_with_error_handling
result = func()
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 576, in code_to_exec
exec(code, module.dict)
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/ocr_app.py", line 6, in
from surya.detection import batch_text_detection
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/detection.py", line 8, in
from surya.postprocessing.heatmap import get_and_clean_boxes
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/postprocessing/heatmap.py", line 10, in
from surya.schema import PolygonBox
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 141, in
class OCRResult(BaseModel):
File "/home/evas/anaconda3/envs/surya_ocr/lib/python3.9/site-packages/surya/schema.py", line 143, in OCRResult
languages: List[str] | None = None
TypeError: unsupported operand type(s) for |: '_GenericAlias' and 'NoneType'
How do I solve it?