Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -103,22 +103,22 @@ class StudyAnalytics:
|
|
103 |
class CRMJABot:
|
104 |
"""Assistente de estudos aprimorado para o Revalida"""
|
105 |
|
106 |
-
def __init__(self):
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
try:
|
116 |
self.qa_pipeline = pipeline(
|
117 |
"question-answering",
|
118 |
model="pierreguillou/bert-base-cased-squad-v1.1-portuguese",
|
119 |
device=-1
|
120 |
)
|
121 |
-
except Exception as e:
|
122 |
print(f"Erro ao carregar o modelo: {e}")
|
123 |
self.qa_pipeline = None
|
124 |
|
@@ -131,16 +131,14 @@ except Exception as e:
|
|
131 |
"/dica": self.get_tip,
|
132 |
"/motiva": self.get_motivation,
|
133 |
"/resumo": self.get_summary,
|
134 |
-
"/ajuda": self.help_command
|
135 |
-
self.
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
"/configurar": self.configure_preferences
|
143 |
-
})
|
144 |
}
|
145 |
|
146 |
def start_command(self, message: str, user_id: str) -> str:
|
|
|
103 |
class CRMJABot:
|
104 |
"""Assistente de estudos aprimorado para o Revalida"""
|
105 |
|
106 |
+
def __init__(self):
|
107 |
+
self.db = RevalidaDatabase()
|
108 |
+
self.planner = StudyPlanGenerator(self.db)
|
109 |
+
self.coach = MotivationalCoach()
|
110 |
+
self.analytics = StudyAnalytics(self.db.conn)
|
111 |
+
self.performance = PerformanceAnalyzer(self.db.conn)
|
112 |
+
self.material_gen = StudyMaterialGenerator(self.db.conn)
|
113 |
+
self.tracker = ProgressTracker(self.db.conn)
|
114 |
+
|
115 |
+
try:
|
116 |
self.qa_pipeline = pipeline(
|
117 |
"question-answering",
|
118 |
model="pierreguillou/bert-base-cased-squad-v1.1-portuguese",
|
119 |
device=-1
|
120 |
)
|
121 |
+
except Exception as e:
|
122 |
print(f"Erro ao carregar o modelo: {e}")
|
123 |
self.qa_pipeline = None
|
124 |
|
|
|
131 |
"/dica": self.get_tip,
|
132 |
"/motiva": self.get_motivation,
|
133 |
"/resumo": self.get_summary,
|
134 |
+
"/ajuda": self.help_command,
|
135 |
+
"/simulado": self.start_simulado,
|
136 |
+
"/caso": self.start_caso_clinico,
|
137 |
+
"/bancoquestoes": self.banco_questoes,
|
138 |
+
"/revisao": self.modo_revisao,
|
139 |
+
"/meta": self.set_goal,
|
140 |
+
"/perfil": self.show_profile,
|
141 |
+
"/configurar": self.configure_preferences
|
|
|
|
|
142 |
}
|
143 |
|
144 |
def start_command(self, message: str, user_id: str) -> str:
|