Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,6 +13,7 @@ from database.db_manager import DatabaseManager
|
|
13 |
from database.db_operations import adicionar_lote_questoes
|
14 |
from study_generators import StudyMaterialGenerator, StudyPlanGenerator
|
15 |
from performance_analyzer import PerformanceAnalyzer
|
|
|
16 |
|
17 |
class CRMJABot:
|
18 |
def __init__(self):
|
@@ -22,11 +23,9 @@ class CRMJABot:
|
|
22 |
self.performance = PerformanceAnalyzer(self.db.get_connection()) # Corrigido aqui
|
23 |
|
24 |
try:
|
25 |
-
# Carrega questões do arquivo JSON
|
26 |
with open('data/questoes_revalida.json', 'r', encoding='utf-8') as f:
|
27 |
questoes = json.load(f)
|
28 |
|
29 |
-
# Adiciona as questões ao banco
|
30 |
sucesso, mensagem = adicionar_lote_questoes(self.db, questoes)
|
31 |
|
32 |
if sucesso:
|
|
|
13 |
from database.db_operations import adicionar_lote_questoes
|
14 |
from study_generators import StudyMaterialGenerator, StudyPlanGenerator
|
15 |
from performance_analyzer import PerformanceAnalyzer
|
16 |
+
import json
|
17 |
|
18 |
class CRMJABot:
|
19 |
def __init__(self):
|
|
|
23 |
self.performance = PerformanceAnalyzer(self.db.get_connection()) # Corrigido aqui
|
24 |
|
25 |
try:
|
|
|
26 |
with open('data/questoes_revalida.json', 'r', encoding='utf-8') as f:
|
27 |
questoes = json.load(f)
|
28 |
|
|
|
29 |
sucesso, mensagem = adicionar_lote_questoes(self.db, questoes)
|
30 |
|
31 |
if sucesso:
|