deleted xml since results were worst
Browse files
app.py
CHANGED
@@ -23,34 +23,10 @@ st.title('🏥 Diagnóstico de Trastornos Mentales')
|
|
23 |
|
24 |
DemoTab, AboutTab = st.tabs(["Demo", "Acerca de"])
|
25 |
|
26 |
-
with AboutTab:
|
27 |
-
st.subheader("Motivación")
|
28 |
-
st.markdown(
|
29 |
-
"[Colocar aquí la motivación]."
|
30 |
-
)
|
31 |
-
|
32 |
-
st.subheader("Recursos")
|
33 |
-
st.markdown("""
|
34 |
-
Modelos usados:
|
35 |
-
- [hackathon-somos-nlp-2023/DiagTrast-Berto](https://huggingface.co/hackathon-somos-nlp-2023/DiagTrast-Berto)
|
36 |
-
- [hackathon-somos-nlp-2023/DiagTrast-xlm-roberta-base](https://huggingface.co/hackathon-somos-nlp-2023/DiagTrast-xlm-roberta-base)
|
37 |
-
|
38 |
-
Dataset:
|
39 |
-
- [hackathon-somos-nlp-2023/DiagTrast](https://huggingface.co/datasets/hackathon-somos-nlp-2023/DiagTrast)
|
40 |
-
""")
|
41 |
-
|
42 |
-
st.subheader("Equipo")
|
43 |
-
st.markdown("""
|
44 |
-
- [Alberto Martín Garrido](https://huggingface.co/Stremie)
|
45 |
-
- [Edgar Mencia]()
|
46 |
-
- [Miguel Ángel Solís Orozco](https://huggingface.co/homosapienssapiens)
|
47 |
-
- [Jose Carlos Vílchez Villegas](https://huggingface.co/JCarlos)
|
48 |
-
""")
|
49 |
-
|
50 |
with DemoTab:
|
51 |
with st.form(key="diagtrast_form"):
|
52 |
-
sintomas = st.text_input(label = 'Introduce
|
53 |
-
value = '
|
54 |
|
55 |
submit_button = st.form_submit_button(label="Clasificar")
|
56 |
|
@@ -60,12 +36,10 @@ with DemoTab:
|
|
60 |
elif submit_button:
|
61 |
with st.spinner('Clasificando...'):
|
62 |
pred_berto = classifier_berto.predict(utils.clean_text(sintomas))
|
63 |
-
pred_xml = classifier_xml.predict(utils.clean_text(sintomas))
|
64 |
|
65 |
df = pd.DataFrame({
|
66 |
-
'Modelo':
|
67 |
-
'Diagnóstico':
|
68 |
-
'Score': [f"{pred_berto[0]['score']:.2%}", f"{pred_xml[0]['score']:.2%}"]
|
69 |
})
|
70 |
|
71 |
st.markdown("### Resultados:")
|
@@ -74,3 +48,26 @@ with DemoTab:
|
|
74 |
st.dataframe(df, use_container_width=True)
|
75 |
st.caption("")
|
76 |
alert = st.success("✅ ¡Hecho!")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
DemoTab, AboutTab = st.tabs(["Demo", "Acerca de"])
|
25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
with DemoTab:
|
27 |
with st.form(key="diagtrast_form"):
|
28 |
+
sintomas = st.text_input(label = 'Introduce texto:',
|
29 |
+
value = 'Soy el más guapo de mi clase')
|
30 |
|
31 |
submit_button = st.form_submit_button(label="Clasificar")
|
32 |
|
|
|
36 |
elif submit_button:
|
37 |
with st.spinner('Clasificando...'):
|
38 |
pred_berto = classifier_berto.predict(utils.clean_text(sintomas))
|
|
|
39 |
|
40 |
df = pd.DataFrame({
|
41 |
+
'Modelo': "DiagTrast-Berto",
|
42 |
+
'Diagnóstico': pred_berto[0]['label']]
|
|
|
43 |
})
|
44 |
|
45 |
st.markdown("### Resultados:")
|
|
|
48 |
st.dataframe(df, use_container_width=True)
|
49 |
st.caption("")
|
50 |
alert = st.success("✅ ¡Hecho!")
|
51 |
+
|
52 |
+
with AboutTab:
|
53 |
+
st.subheader("Motivación")
|
54 |
+
st.markdown(
|
55 |
+
"[Colocar aquí la motivación]."
|
56 |
+
)
|
57 |
+
|
58 |
+
st.subheader("Recursos")
|
59 |
+
st.markdown("""
|
60 |
+
Modelos usados:
|
61 |
+
- [hackathon-somos-nlp-2023/DiagTrast-Berto](https://huggingface.co/hackathon-somos-nlp-2023/DiagTrast-Berto)
|
62 |
+
|
63 |
+
Dataset:
|
64 |
+
- [hackathon-somos-nlp-2023/DiagTrast](https://huggingface.co/datasets/hackathon-somos-nlp-2023/DiagTrast)
|
65 |
+
""")
|
66 |
+
|
67 |
+
st.subheader("Equipo")
|
68 |
+
st.markdown("""
|
69 |
+
- [Alberto Martín Garrido](https://huggingface.co/Stremie)
|
70 |
+
- [Edgar Mencia](https://huggingface.co/edmenciab)
|
71 |
+
- [Miguel Ángel Solís Orozco](https://huggingface.co/homosapienssapiens)
|
72 |
+
- [Jose Carlos Vílchez Villegas](https://huggingface.co/JCarlos)
|
73 |
+
""")
|