Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -11,16 +11,21 @@ from simulado_system import SimuladoSystem, CasoClinicoSystem
|
|
11 |
import json
|
12 |
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 |
import json
|
17 |
|
18 |
class CRMJABot:
|
19 |
def __init__(self):
|
20 |
self.db = DatabaseManager()
|
21 |
-
self.material_generator = StudyMaterialGenerator(self.db.get_connection())
|
22 |
self.planner = StudyPlanGenerator(self.db)
|
23 |
-
self.
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
try:
|
26 |
with open('data/questoes_revalida.json', 'r', encoding='utf-8') as f:
|
@@ -185,10 +190,9 @@ class StudyAnalytics:
|
|
185 |
break
|
186 |
return streak
|
187 |
|
188 |
-
class
|
189 |
-
def __init__(self):
|
190 |
-
self.
|
191 |
-
self.material_generator = StudyMaterialGenerator(self.db.get_connection()) # Passa o argumento necessário
|
192 |
self.planner = StudyPlanGenerator(self.db) # Certifique-se de que StudyPlanGenerator aceita a instância de db
|
193 |
self.coach = MotivationalCoach()
|
194 |
self.analytics = StudyAnalytics(self.db.conn) # Certifique-se de que StudyAnalytics aceita db.conn
|
|
|
11 |
import json
|
12 |
from database.db_manager import DatabaseManager
|
13 |
from database.db_operations import adicionar_lote_questoes
|
14 |
+
from study_generators import StudyMaterialGenerator, StudyPlanGenerator(self.db)
|
15 |
from performance_analyzer import PerformanceAnalyzer
|
16 |
import json
|
17 |
|
18 |
class CRMJABot:
|
19 |
def __init__(self):
|
20 |
self.db = DatabaseManager()
|
21 |
+
self.material_generator = StudyMaterialGenerator(self.db.get_connection()) # Corrigido para aceitar o argumento
|
22 |
self.planner = StudyPlanGenerator(self.db)
|
23 |
+
self.coach = MotivationalCoach()
|
24 |
+
self.analytics = StudyAnalytics(self.db.conn)
|
25 |
+
self.tracker = ProgressTracker(self.db.conn)
|
26 |
+
|
27 |
+
self.performance = PerformanceAnalyzer()
|
28 |
+
self.performance.set_db_connection(self.db.get_connection())
|
29 |
|
30 |
try:
|
31 |
with open('data/questoes_revalida.json', 'r', encoding='utf-8') as f:
|
|
|
190 |
break
|
191 |
return streak
|
192 |
|
193 |
+
class StudyMaterialGenerator:
|
194 |
+
def __init__(self, db_connection):
|
195 |
+
self.db_connection = db_connection # Passa o argumento necessário
|
|
|
196 |
self.planner = StudyPlanGenerator(self.db) # Certifique-se de que StudyPlanGenerator aceita a instância de db
|
197 |
self.coach = MotivationalCoach()
|
198 |
self.analytics = StudyAnalytics(self.db.conn) # Certifique-se de que StudyAnalytics aceita db.conn
|