Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,6 @@ with gr.Blocks(css=".gradio-container { max-width: 900px; margin: auto; padding:
|
|
96 |
|
97 |
with gr.Row():
|
98 |
analyze_button = gr.Button("Analyze Sentiment", variant="primary") # Blue button
|
99 |
-
clear_button = gr.ClearButton([text_input, gru_output, lstm_output, bilstm_output, statistics_output]) # Clear button
|
100 |
|
101 |
with gr.Row():
|
102 |
with gr.Column():
|
@@ -107,6 +106,9 @@ with gr.Blocks(css=".gradio-container { max-width: 900px; margin: auto; padding:
|
|
107 |
with gr.Column():
|
108 |
statistics_output = gr.Textbox(label="Statistics (Lowest, Highest, Average)", interactive=False)
|
109 |
|
|
|
|
|
|
|
110 |
# Button to analyze sentiment and show statistics
|
111 |
def process_input_and_analyze(text_input):
|
112 |
results, statistics = analyze_sentiment_and_statistics(text_input)
|
|
|
96 |
|
97 |
with gr.Row():
|
98 |
analyze_button = gr.Button("Analyze Sentiment", variant="primary") # Blue button
|
|
|
99 |
|
100 |
with gr.Row():
|
101 |
with gr.Column():
|
|
|
106 |
with gr.Column():
|
107 |
statistics_output = gr.Textbox(label="Statistics (Lowest, Highest, Average)", interactive=False)
|
108 |
|
109 |
+
# Clear button (must be defined after the components it clears)
|
110 |
+
clear_button = gr.ClearButton([text_input, gru_output, lstm_output, bilstm_output, statistics_output])
|
111 |
+
|
112 |
# Button to analyze sentiment and show statistics
|
113 |
def process_input_and_analyze(text_input):
|
114 |
results, statistics = analyze_sentiment_and_statistics(text_input)
|