Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,6 @@ model_berto='hackathon-somos-nlp-2023/DiagTrast-Berto'
|
|
13 |
tokenizer_berto = AutoTokenizer.from_pretrained(model_berto)
|
14 |
classifier_berto = pipeline("text-classification", model=model_berto)
|
15 |
|
16 |
-
model_xml='hackathon-somos-nlp-2023/DiagTrast-xlm-roberta-base'
|
17 |
-
tokenizer_xml = AutoTokenizer.from_pretrained(model_xml)
|
18 |
-
classifier_xml = pipeline("text-classification", model=model_xml)
|
19 |
-
|
20 |
#####################
|
21 |
|
22 |
st.title('馃彞 Diagn贸stico de Trastornos Mentales')
|
@@ -30,6 +26,12 @@ with DemoTab:
|
|
30 |
|
31 |
submit_button = st.form_submit_button(label="Clasificar")
|
32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
if submit_button and not sintomas:
|
34 |
st.warning("鈿狅笍 Debe introducir los s铆ntomas.")
|
35 |
|
@@ -39,7 +41,7 @@ with DemoTab:
|
|
39 |
|
40 |
df = pd.DataFrame({
|
41 |
'Modelo': "DiagTrast-Berto",
|
42 |
-
'Diagn贸stico': pred_berto[0]['label']
|
43 |
})
|
44 |
|
45 |
st.markdown("### Resultados:")
|
|
|
13 |
tokenizer_berto = AutoTokenizer.from_pretrained(model_berto)
|
14 |
classifier_berto = pipeline("text-classification", model=model_berto)
|
15 |
|
|
|
|
|
|
|
|
|
16 |
#####################
|
17 |
|
18 |
st.title('馃彞 Diagn贸stico de Trastornos Mentales')
|
|
|
26 |
|
27 |
submit_button = st.form_submit_button(label="Clasificar")
|
28 |
|
29 |
+
with st.form(key="examples"):
|
30 |
+
ex_1 = st.form_submit_button(label="Yo tambi茅n")
|
31 |
+
|
32 |
+
if ex_1:
|
33 |
+
sintomas=ex_1
|
34 |
+
|
35 |
if submit_button and not sintomas:
|
36 |
st.warning("鈿狅笍 Debe introducir los s铆ntomas.")
|
37 |
|
|
|
41 |
|
42 |
df = pd.DataFrame({
|
43 |
'Modelo': "DiagTrast-Berto",
|
44 |
+
'Diagn贸stico': pred_berto[0]['label']
|
45 |
})
|
46 |
|
47 |
st.markdown("### Resultados:")
|