Update app.py
Browse files
app.py
CHANGED
|
@@ -5,11 +5,18 @@ from PIL import Image
|
|
| 5 |
from path import Path
|
| 6 |
import streamlit as st
|
| 7 |
from typing import Tuple
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
from app.dataloader_iam import Batch
|
| 9 |
from app.model import Model, DecoderType
|
| 10 |
from app.preprocessor import Preprocessor
|
| 11 |
from streamlit_drawable_canvas import st_canvas
|
| 12 |
-
import easyocr # Import EasyOCR
|
| 13 |
|
| 14 |
# Set page config at the very beginning (only executed once)
|
| 15 |
st.set_page_config(
|
|
|
|
| 5 |
from path import Path
|
| 6 |
import streamlit as st
|
| 7 |
from typing import Tuple
|
| 8 |
+
import easyocr # Import EasyOCR
|
| 9 |
+
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
import sys
|
| 12 |
+
|
| 13 |
+
# Add the 'app' directory to the sys.path
|
| 14 |
+
# Assuming 'app' is in the current working directory
|
| 15 |
+
sys.path.append(str(Path(__file__).parent / 'app'))
|
| 16 |
from app.dataloader_iam import Batch
|
| 17 |
from app.model import Model, DecoderType
|
| 18 |
from app.preprocessor import Preprocessor
|
| 19 |
from streamlit_drawable_canvas import st_canvas
|
|
|
|
| 20 |
|
| 21 |
# Set page config at the very beginning (only executed once)
|
| 22 |
st.set_page_config(
|