Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -94,8 +94,10 @@ with gr.Blocks(css=".gradio-container { max-width: 900px; margin: auto; padding:
|
|
94 |
placeholder="Type your review here..."
|
95 |
)
|
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,9 +108,6 @@ with gr.Blocks(css=".gradio-container { max-width: 900px; margin: auto; padding:
|
|
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)
|
|
|
94 |
placeholder="Type your review here..."
|
95 |
)
|
96 |
|
97 |
+
# Buttons placed together in a row
|
98 |
with gr.Row():
|
99 |
analyze_button = gr.Button("Analyze Sentiment", variant="primary") # Blue button
|
100 |
+
clear_button = gr.ClearButton([text_input, gru_output, lstm_output, bilstm_output, statistics_output]) # Clear button
|
101 |
|
102 |
with gr.Row():
|
103 |
with gr.Column():
|
|
|
108 |
with gr.Column():
|
109 |
statistics_output = gr.Textbox(label="Statistics (Lowest, Highest, Average)", interactive=False)
|
110 |
|
|
|
|
|
|
|
111 |
# Button to analyze sentiment and show statistics
|
112 |
def process_input_and_analyze(text_input):
|
113 |
results, statistics = analyze_sentiment_and_statistics(text_input)
|