Spaces:
AIdeaText
/
Running on CPU Upgrade

AIdeaText commited on
Commit
9f81b24
·
verified ·
1 Parent(s): fcc1a1e

Update modules/database/semantic_mongo_db.py

Browse files
modules/database/semantic_mongo_db.py CHANGED
@@ -22,6 +22,8 @@ from .mongo_db import (
22
  logger = logging.getLogger(__name__) # Cambiado de name a __name__
23
  COLLECTION_NAME = 'student_semantic_analysis'
24
 
 
 
25
  def store_student_semantic_result(username, text, analysis_result):
26
  """
27
  Guarda el resultado del análisis semántico en MongoDB.
@@ -47,6 +49,8 @@ def store_student_semantic_result(username, text, analysis_result):
47
  }
48
 
49
  # Insertar en MongoDB
 
 
50
  # Verificar explícitamente el resultado
51
  if result and '_id' in result:
52
  logger.info(f"Análisis semántico guardado con ID: {result['_id']} para el usuario: {username}")
 
22
  logger = logging.getLogger(__name__) # Cambiado de name a __name__
23
  COLLECTION_NAME = 'student_semantic_analysis'
24
 
25
+ ############################################################
26
+
27
  def store_student_semantic_result(username, text, analysis_result):
28
  """
29
  Guarda el resultado del análisis semántico en MongoDB.
 
49
  }
50
 
51
  # Insertar en MongoDB
52
+ result = insert_document(COLLECTION_NAME, analysis_document)
53
+
54
  # Verificar explícitamente el resultado
55
  if result and '_id' in result:
56
  logger.info(f"Análisis semántico guardado con ID: {result['_id']} para el usuario: {username}")