Spaces:
Running
Running
Update modules/__init__.py
Browse files- modules/__init__.py +33 -2
modules/__init__.py
CHANGED
|
@@ -47,7 +47,15 @@ def load_database_functions():
|
|
| 47 |
delete_student_semantic_analysis,
|
| 48 |
get_student_semantic_data
|
| 49 |
)
|
| 50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
from .database.chat_db import store_chat_history, get_chat_history
|
| 52 |
|
| 53 |
return {
|
|
@@ -74,7 +82,12 @@ def load_database_functions():
|
|
| 74 |
'delete_student_semantic_analysis': delete_student_semantic_analysis,
|
| 75 |
'get_student_semantic_data': get_student_semantic_data,
|
| 76 |
'store_chat_history': store_chat_history,
|
| 77 |
-
'get_chat_history': get_chat_history
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
}
|
| 79 |
|
| 80 |
def load_ui_functions():
|
|
@@ -124,6 +137,23 @@ def load_semantic_functions():
|
|
| 124 |
}
|
| 125 |
|
| 126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
def load_admin_functions():
|
| 128 |
from .admin.admin_ui import admin_page
|
| 129 |
return {
|
|
@@ -152,6 +182,7 @@ def load_all_functions():
|
|
| 152 |
**load_admin_functions(),
|
| 153 |
**load_morphosyntax_functions(),
|
| 154 |
**load_semantic_functions(),
|
|
|
|
| 155 |
**load_utils_functions(),
|
| 156 |
**load_chatbot_functions(),
|
| 157 |
**load_student_activities_functions()
|
|
|
|
| 47 |
delete_student_semantic_analysis,
|
| 48 |
get_student_semantic_data
|
| 49 |
)
|
| 50 |
+
|
| 51 |
+
from .database.discourse_mongo_db import (
|
| 52 |
+
store_student_discourse_result',
|
| 53 |
+
get_student_discourse_analysis',
|
| 54 |
+
update_student_discourse_analysis',
|
| 55 |
+
delete_student_discourse_analysis',
|
| 56 |
+
get_student_discourse_data'
|
| 57 |
+
)
|
| 58 |
+
|
| 59 |
from .database.chat_db import store_chat_history, get_chat_history
|
| 60 |
|
| 61 |
return {
|
|
|
|
| 82 |
'delete_student_semantic_analysis': delete_student_semantic_analysis,
|
| 83 |
'get_student_semantic_data': get_student_semantic_data,
|
| 84 |
'store_chat_history': store_chat_history,
|
| 85 |
+
'get_chat_history': get_chat_history,
|
| 86 |
+
'store_student_discourse_result': store_student_discourse_result,
|
| 87 |
+
'get_student_discourse_analysis': get_student_discourse_analysis,
|
| 88 |
+
'update_student_discourse_analysis': update_student_discourse_analysis,
|
| 89 |
+
'delete_student_discourse_analysis'; delete_student_discourse_analysis,
|
| 90 |
+
'get_student_discourse_data': get_student_discourse_data
|
| 91 |
}
|
| 92 |
|
| 93 |
def load_ui_functions():
|
|
|
|
| 137 |
}
|
| 138 |
|
| 139 |
|
| 140 |
+
def load_discourse_functions():
|
| 141 |
+
from modules.discourse.discourse_interface import (
|
| 142 |
+
display_discourse_interface,
|
| 143 |
+
display_discourse_results
|
| 144 |
+
)
|
| 145 |
+
from modules.discourse.discourse_process import (
|
| 146 |
+
process_discourse_input,
|
| 147 |
+
format_discourse_results
|
| 148 |
+
)
|
| 149 |
+
|
| 150 |
+
return {
|
| 151 |
+
'display_discourse_interface': display_semantic_interface,
|
| 152 |
+
'display_discourse_results': display_semantic_results,
|
| 153 |
+
'process_discourse_input': process_semantic_input,
|
| 154 |
+
'format_discourse_results': format_analysis_results,
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
def load_admin_functions():
|
| 158 |
from .admin.admin_ui import admin_page
|
| 159 |
return {
|
|
|
|
| 182 |
**load_admin_functions(),
|
| 183 |
**load_morphosyntax_functions(),
|
| 184 |
**load_semantic_functions(),
|
| 185 |
+
**load_discourse_functions(),
|
| 186 |
**load_utils_functions(),
|
| 187 |
**load_chatbot_functions(),
|
| 188 |
**load_student_activities_functions()
|