Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,7 @@ DemoTab, AboutTab = st.tabs(["Demo", "Acerca de"])
|
|
| 22 |
with DemoTab:
|
| 23 |
with st.form(key="diagtrast_form"):
|
| 24 |
sintomas = st.text_input(label = 'Introduce texto:',
|
| 25 |
-
|
| 26 |
|
| 27 |
submit_button = st.form_submit_button(label="Clasificar")
|
| 28 |
|
|
@@ -30,7 +30,7 @@ with DemoTab:
|
|
| 30 |
ex_1 = st.form_submit_button(label="Yo también")
|
| 31 |
|
| 32 |
if ex_1:
|
| 33 |
-
sintomas=
|
| 34 |
|
| 35 |
if submit_button and not sintomas:
|
| 36 |
st.warning("⚠️ Debe introducir los síntomas.")
|
|
@@ -40,8 +40,8 @@ with DemoTab:
|
|
| 40 |
pred_berto = classifier_berto.predict(utils.clean_text(sintomas))
|
| 41 |
|
| 42 |
df = pd.DataFrame({
|
| 43 |
-
'Modelo': "DiagTrast-Berto",
|
| 44 |
-
'Diagnóstico': pred_berto[0]['label']
|
| 45 |
})
|
| 46 |
|
| 47 |
st.markdown("### Resultados:")
|
|
|
|
| 22 |
with DemoTab:
|
| 23 |
with st.form(key="diagtrast_form"):
|
| 24 |
sintomas = st.text_input(label = 'Introduce texto:',
|
| 25 |
+
value = 'Soy el más guapo de mi clase')
|
| 26 |
|
| 27 |
submit_button = st.form_submit_button(label="Clasificar")
|
| 28 |
|
|
|
|
| 30 |
ex_1 = st.form_submit_button(label="Yo también")
|
| 31 |
|
| 32 |
if ex_1:
|
| 33 |
+
sintomas.value = ex1
|
| 34 |
|
| 35 |
if submit_button and not sintomas:
|
| 36 |
st.warning("⚠️ Debe introducir los síntomas.")
|
|
|
|
| 40 |
pred_berto = classifier_berto.predict(utils.clean_text(sintomas))
|
| 41 |
|
| 42 |
df = pd.DataFrame({
|
| 43 |
+
'Modelo': ["DiagTrast-Berto"],
|
| 44 |
+
'Diagnóstico': [pred_berto[0]['label']]
|
| 45 |
})
|
| 46 |
|
| 47 |
st.markdown("### Resultados:")
|