Update modules/ui.py
Browse files- modules/ui.py +1 -7
modules/ui.py
CHANGED
@@ -303,21 +303,18 @@ def display_semantic_analysis_interface(nlp_models, lang_code):
|
|
303 |
'title': "AIdeaText - Análisis semántico",
|
304 |
'file_uploader': "Cargar archivo de texto",
|
305 |
'analyze_button': "Analizar texto",
|
306 |
-
'context_analysis': "Análisis de Contexto",
|
307 |
'semantic_relations': "Relaciones Semánticas Relevantes",
|
308 |
},
|
309 |
'en': {
|
310 |
'title': "AIdeaText - Semantic Analysis",
|
311 |
'file_uploader': "Upload text file",
|
312 |
'analyze_button': "Analyze text",
|
313 |
-
'context_analysis': "Context Analysis",
|
314 |
'semantic_relations': "Relevant Semantic Relations",
|
315 |
},
|
316 |
'fr': {
|
317 |
'title': "AIdeaText - Analyse sémantique",
|
318 |
'file_uploader': "Télécharger le fichier texte",
|
319 |
'analyze_button': "Analyser le texte",
|
320 |
-
'context_analysis': "Analyse de Contexte",
|
321 |
'semantic_relations': "Relations Sémantiques Pertinentes",
|
322 |
}
|
323 |
}
|
@@ -332,10 +329,7 @@ def display_semantic_analysis_interface(nlp_models, lang_code):
|
|
332 |
text_content = uploaded_file.getvalue().decode('utf-8')
|
333 |
|
334 |
if st.button(t['analyze_button']):
|
335 |
-
|
336 |
-
|
337 |
-
with st.expander(t['context_analysis'], expanded=True):
|
338 |
-
st.pyplot(context_graph)
|
339 |
|
340 |
with st.expander(t['semantic_relations'], expanded=True):
|
341 |
st.pyplot(relations_graph)
|
|
|
303 |
'title': "AIdeaText - Análisis semántico",
|
304 |
'file_uploader': "Cargar archivo de texto",
|
305 |
'analyze_button': "Analizar texto",
|
|
|
306 |
'semantic_relations': "Relaciones Semánticas Relevantes",
|
307 |
},
|
308 |
'en': {
|
309 |
'title': "AIdeaText - Semantic Analysis",
|
310 |
'file_uploader': "Upload text file",
|
311 |
'analyze_button': "Analyze text",
|
|
|
312 |
'semantic_relations': "Relevant Semantic Relations",
|
313 |
},
|
314 |
'fr': {
|
315 |
'title': "AIdeaText - Analyse sémantique",
|
316 |
'file_uploader': "Télécharger le fichier texte",
|
317 |
'analyze_button': "Analyser le texte",
|
|
|
318 |
'semantic_relations': "Relations Sémantiques Pertinentes",
|
319 |
}
|
320 |
}
|
|
|
329 |
text_content = uploaded_file.getvalue().decode('utf-8')
|
330 |
|
331 |
if st.button(t['analyze_button']):
|
332 |
+
relations_graph = perform_semantic_analysis(text_content, nlp_models[lang_code], lang_code)
|
|
|
|
|
|
|
333 |
|
334 |
with st.expander(t['semantic_relations'], expanded=True):
|
335 |
st.pyplot(relations_graph)
|