AIdeaText commited on
Commit
883e8d1
verified
1 Parent(s): 1a072cc

Update modules/ui/ui.py

Browse files
Files changed (1) hide show
  1. modules/ui/ui.py +66 -19
modules/ui/ui.py CHANGED
@@ -1,35 +1,82 @@
1
  # modules/ui/ui.py
2
  # Importaciones generales
3
-
4
- # modules/ui/ui.py
5
  import streamlit as st
6
  from streamlit_player import st_player
7
  import logging
8
- from datetime import datetime
9
  from dateutil.parser import parse
10
 
 
 
 
 
11
  # Importaciones locales
12
- from session_state import initialize_session_state, logout
13
- from translations import get_translations
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
- from ..auth.auth import authenticate_user, authenticate_student, authenticate_admin
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
- from ..database.sql_db import store_application_request
 
 
 
18
 
19
- #from .user_page import user_page
20
- try:
21
- from .user_page import user_page
22
- except ImportError:
23
- logger.error("No se pudo importar user_page. Aseg煤rate de que el archivo existe.")
24
- # Definir una funci贸n de respaldo
25
- def user_page(lang_code, t):
26
- st.error("La p谩gina de usuario no est谩 disponible. Por favor, contacta al administrador.")
27
 
28
- from ..admin.admin_ui import admin_page
 
 
 
 
 
 
 
29
 
30
- # Configuraci贸n del logger
31
- logging.basicConfig(level=logging.INFO)
32
- logger = logging.getLogger(__name__)
33
 
34
  #############################################################
35
  def main():
 
1
  # modules/ui/ui.py
2
  # Importaciones generales
 
 
3
  import streamlit as st
4
  from streamlit_player import st_player
5
  import logging
6
+ from datetime import datetime, timezone
7
  from dateutil.parser import parse
8
 
9
+ # Configuraci贸n del logger
10
+ logging.basicConfig(level=logging.INFO)
11
+ logger = logging.getLogger(__name__)
12
+
13
  # Importaciones locales
14
+ try:
15
+ from session_state import initialize_session_state, logout
16
+ from translations import get_translations
17
+ from ..studentact.student_activities_v2 import display_student_activities
18
+ from ..auth.auth import authenticate_user, authenticate_student, authenticate_admin
19
+ from ..admin.admin_ui import admin_page
20
+ from ..chatbot import display_sidebar_chat
21
+ # Nuevas importaciones para situaci贸n actual
22
+ from ..studentact.current_situation_interface import display_current_situation_interface
23
+ from ..studentact.current_situation_analysis import analyze_text_dimensions
24
+ from ..database.claude_recommendations_mongo_db import get_claude_recommendations
25
+ except ImportError as e:
26
+ logger.error(f"Error en importaciones: {str(e)}")
27
+ logger.error("No se pudo importar user_page. Aseg煤rate de que el archivo existe.")
28
 
29
+ ##Importaciones desde la configuraci贸n de bases datos #######
30
+ try:
31
+ from ..database.sql_db import (
32
+ store_application_request,
33
+ store_student_feedback,
34
+ store_application_request
35
+ )
36
+
37
+ from ..database.mongo_db import (
38
+ get_collection,
39
+ insert_document,
40
+ find_documents,
41
+ update_document,
42
+ delete_document
43
+ )
44
+
45
+ from ..database.morphosintax_mongo_db import (
46
+ store_student_morphosyntax_result,
47
+ get_student_morphosyntax_analysis,
48
+ update_student_morphosyntax_analysis,
49
+ delete_student_morphosyntax_analysis,
50
+ get_student_morphosyntax_data
51
+ )
52
+
53
+ from ..database.chat_mongo_db import store_chat_history, get_chat_history
54
+ except ImportError as e:
55
+ logger.error(f"Error en importaciones de base de datos: {str(e)}")
56
+
57
+ ##Importaciones desde los an谩lisis #######
58
+ try:
59
+ from ..morphosyntax.morphosyntax_interface import (
60
+ display_morphosyntax_interface,
61
+ display_morphosyntax_results
62
+ )
63
 
64
+ from ..semantic.semantic_interface import (
65
+ display_semantic_interface,
66
+ display_semantic_results
67
+ )
68
 
69
+ from ..semantic.semantic_live_interface import display_semantic_live_interface
 
 
 
 
 
 
 
70
 
71
+ from ..discourse.discourse_live_interface import display_discourse_live_interface
72
+
73
+ from ..discourse.discourse_interface import ( # Agregar esta importaci贸n
74
+ display_discourse_interface,
75
+ display_discourse_results
76
+ )
77
+ except ImportError as e:
78
+ logger.error(f"Error en importaciones de interfaces de an谩lisis: {str(e)}")
79
 
 
 
 
80
 
81
  #############################################################
82
  def main():