artificialguybr commited on
Commit
1af55e7
·
verified ·
1 Parent(s): ee99691

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -13,8 +13,7 @@ from surya.model.recognition.model import load_model as load_rec_model
13
  from surya.model.recognition.processor import load_processor as load_rec_processor
14
  from surya.settings import settings
15
  from surya.model.ordering.processor import load_processor as load_order_processor
16
- from surya.model.ordering.model import load_order_model
17
- import io
18
 
19
  # Configuração de logging
20
  logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
@@ -35,8 +34,10 @@ det_processor, det_model = load_det_processor(), load_det_model()
35
  rec_model, rec_processor = load_rec_model(), load_rec_processor()
36
  layout_model = load_det_model(checkpoint=settings.LAYOUT_MODEL_CHECKPOINT)
37
  layout_processor = load_det_processor(checkpoint=settings.LAYOUT_MODEL_CHECKPOINT)
38
- order_model = load_order_model()
39
  order_processor = load_order_processor()
 
 
 
40
 
41
  # Compilação do modelo de reconhecimento
42
  logger.info("Compilando modelo de reconhecimento...")
 
13
  from surya.model.recognition.processor import load_processor as load_rec_processor
14
  from surya.settings import settings
15
  from surya.model.ordering.processor import load_processor as load_order_processor
16
+ # Removemos a importação problemática e usaremos uma alternativa
 
17
 
18
  # Configuração de logging
19
  logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')
 
34
  rec_model, rec_processor = load_rec_model(), load_rec_processor()
35
  layout_model = load_det_model(checkpoint=settings.LAYOUT_MODEL_CHECKPOINT)
36
  layout_processor = load_det_processor(checkpoint=settings.LAYOUT_MODEL_CHECKPOINT)
 
37
  order_processor = load_order_processor()
38
+ # Vamos tentar carregar o modelo de ordenação de uma maneira diferente
39
+ from surya.model.ordering import model as order_model_module
40
+ order_model = order_model_module.Model()
41
 
42
  # Compilação do modelo de reconhecimento
43
  logger.info("Compilando modelo de reconhecimento...")