Spaces:
Runtime error
Runtime error
eduardo-meik
commited on
Commit
·
b7739ef
1
Parent(s):
82c37b3
Update app.py
Browse files
app.py
CHANGED
@@ -13,12 +13,15 @@ st.title("Plataforma de Diálogos Participativos")
|
|
13 |
# Text area for input
|
14 |
text = st.text_area("Añade el texto a evaluar")
|
15 |
|
16 |
-
# Create
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
19 |
|
20 |
# Container for output
|
21 |
-
output_container = st.
|
22 |
|
23 |
# Check if the sentiment analysis button has been pressed and if there's text in the text area
|
24 |
if run_sentiment_analysis and text:
|
@@ -37,3 +40,5 @@ if run_toxicity_analysis and text:
|
|
37 |
st.json(toxicity_output)
|
38 |
elif run_toxicity_analysis and not text:
|
39 |
st.warning("Por favor, añade un texto para evaluar la toxicidad.")
|
|
|
|
|
|
13 |
# Text area for input
|
14 |
text = st.text_area("Añade el texto a evaluar")
|
15 |
|
16 |
+
# Create columns for buttons
|
17 |
+
col1, col2 = st.columns(2)
|
18 |
+
|
19 |
+
# Place each button in a separate column to make them appear on the same row
|
20 |
+
run_sentiment_analysis = col1.button("Evaluar Sentimiento")
|
21 |
+
run_toxicity_analysis = col2.button("Evaluar Toxicidad")
|
22 |
|
23 |
# Container for output
|
24 |
+
output_container = st.container()
|
25 |
|
26 |
# Check if the sentiment analysis button has been pressed and if there's text in the text area
|
27 |
if run_sentiment_analysis and text:
|
|
|
40 |
st.json(toxicity_output)
|
41 |
elif run_toxicity_analysis and not text:
|
42 |
st.warning("Por favor, añade un texto para evaluar la toxicidad.")
|
43 |
+
|
44 |
+
|