Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yjmm10 committed Aug 13, 2024
1 parent 9629af2 commit 7361adb
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 30 deletions.
13 changes: 2 additions & 11 deletions api/telos_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@
from fastapi import FastAPI, File, UploadFile
from fastapi.responses import FileResponse, JSONResponse

from telos import (
CRNN,
OCR,
DBNet,
DetFormula,
LatexOCR,
Layout,
ReadingOrder,
Table_TSR,
YOLOv8,
)
from telos import (CRNN, OCR, DBNet, DetFormula, LatexOCR, Layout,
ReadingOrder, Table_TSR, YOLOv8)

app = FastAPI()

Expand Down
4 changes: 2 additions & 2 deletions telos/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
__project__ = "telos"

from telos.config import *

# from telos.utils import check_source
from telos.core import CRNN, CVModel, DBNet, LatexOCR, Lore, ReadingOrder, YOLOv8
from telos.core import (CRNN, CVModel, DBNet, LatexOCR, Lore, ReadingOrder,
YOLOv8)
from telos.data import IMG_FORMATS, MetaFile
from telos.modules import OCR, DetFormula, Layout, Table_TSR

Expand Down
3 changes: 1 addition & 2 deletions telos/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from dynaconf import Dynaconf


_base_dir = Path(__file__).parent.parent

_settings_files = [
Expand All @@ -34,8 +33,8 @@
)


from .settings1 import __curr_path__, __model_path__
from .settings1 import * # formula_model, formula_labels
from .settings1 import __curr_path__, __model_path__

# __all__ = (
# "__curr_path__",
Expand Down
1 change: 0 additions & 1 deletion telos/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from .base import CVModel, OrtInferSession
from .detection import DBNet, Lore, YOLOv8

# from .imageprocess import *
from .reading_order import ReadingOrder
from .recognition import CRNN, LatexOCR
Expand Down
3 changes: 2 additions & 1 deletion telos/core/base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
import numpy as np
import onnxruntime as ort
from huggingface_hub import snapshot_download
from onnxruntime import GraphOptimizationLevel, InferenceSession, SessionOptions
from onnxruntime import (GraphOptimizationLevel, InferenceSession,
SessionOptions)

from telos import __project__
from telos.config import __model_path__
Expand Down
3 changes: 2 additions & 1 deletion telos/core/recognition/latexocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
import cv2
import numpy as np
import yaml
from onnxruntime import GraphOptimizationLevel, InferenceSession, SessionOptions
from onnxruntime import (GraphOptimizationLevel, InferenceSession,
SessionOptions)
from PIL import Image, UnidentifiedImageError
from tokenizers import Tokenizer
from tokenizers.models import BPE
Expand Down
3 changes: 2 additions & 1 deletion telos/data/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .types import IMG_FORMATS, MetaArea, MetaBbox, MetaFile, MetaLayout, MetaText
from .types import (IMG_FORMATS, MetaArea, MetaBbox, MetaFile, MetaLayout,
MetaText)

__all__ = [
"IMG_FORMATS",
Expand Down
13 changes: 2 additions & 11 deletions webui/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,8 @@
import psutil
import streamlit as st

from telos import (
CRNN,
OCR,
DBNet,
DetFormula,
LatexOCR,
Layout,
ReadingOrder,
Table_TSR,
YOLOv8,
)
from telos import (CRNN, OCR, DBNet, DetFormula, LatexOCR, Layout,
ReadingOrder, Table_TSR, YOLOv8)

st.set_page_config(layout="wide")
st.title("Telos 演示")
Expand Down

0 comments on commit 7361adb

Please sign in to comment.