Spaces:
Sleeping
Sleeping
Update modules/studentact/student_activities_v2.py
Browse files
modules/studentact/student_activities_v2.py
CHANGED
|
@@ -190,46 +190,6 @@ def display_discourse_comparison(analysis: dict, t: dict):
|
|
| 190 |
df2 = pd.DataFrame(analysis['key_concepts2'])
|
| 191 |
st.dataframe(df2)
|
| 192 |
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
###################################################################################
|
| 196 |
-
# También podemos optimizar las consultas a la base de datos para que solo traigan los campos necesarios:
|
| 197 |
-
|
| 198 |
-
def get_student_semantic_analysis(username, limit=10):
|
| 199 |
-
"""
|
| 200 |
-
Recupera solo los grafos de los análisis semánticos
|
| 201 |
-
"""
|
| 202 |
-
query = {"username": username, "analysis_type": "semantic"}
|
| 203 |
-
projection = {
|
| 204 |
-
"timestamp": 1,
|
| 205 |
-
"concept_graph": 1
|
| 206 |
-
}
|
| 207 |
-
return find_documents(
|
| 208 |
-
COLLECTION_NAME,
|
| 209 |
-
query=query,
|
| 210 |
-
projection=projection,
|
| 211 |
-
sort=[("timestamp", -1)],
|
| 212 |
-
limit=limit
|
| 213 |
-
)
|
| 214 |
-
|
| 215 |
-
def get_student_discourse_analysis(username, limit=10):
|
| 216 |
-
"""
|
| 217 |
-
Recupera solo los grafos combinados de los análisis de discurso
|
| 218 |
-
"""
|
| 219 |
-
query = {"username": username, "analysis_type": "discourse"}
|
| 220 |
-
projection = {
|
| 221 |
-
"timestamp": 1,
|
| 222 |
-
"combined_graph": 1
|
| 223 |
-
}
|
| 224 |
-
return find_documents(
|
| 225 |
-
COLLECTION_NAME,
|
| 226 |
-
query=query,
|
| 227 |
-
projection=projection,
|
| 228 |
-
sort=[("timestamp", -1)],
|
| 229 |
-
limit=limit
|
| 230 |
-
)
|
| 231 |
-
|
| 232 |
-
|
| 233 |
#################################################################################
|
| 234 |
def display_chat_activities(username: str, t: dict):
|
| 235 |
"""
|
|
|
|
| 190 |
df2 = pd.DataFrame(analysis['key_concepts2'])
|
| 191 |
st.dataframe(df2)
|
| 192 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
#################################################################################
|
| 194 |
def display_chat_activities(username: str, t: dict):
|
| 195 |
"""
|