Update app.py
Browse files
app.py
CHANGED
@@ -55,8 +55,8 @@ def analyze_sentiment(file, text_column, pos_thresh, neg_thresh):
|
|
55 |
# Plot 2: Compound score histogram
|
56 |
plt.figure(figsize=(6, 4))
|
57 |
sns.histplot(df["compound"], bins=30, kde=True, color="skyblue")
|
58 |
-
plt.title("Compound
|
59 |
-
plt.xlabel("Compound
|
60 |
plt.tight_layout()
|
61 |
compound_fig = "compound_dist.png"
|
62 |
plt.savefig(compound_fig)
|
@@ -78,7 +78,7 @@ def get_text_columns(file):
|
|
78 |
return gr.update(choices=[], value=None, label="⚠️ Error reading file")
|
79 |
|
80 |
with gr.Blocks() as app:
|
81 |
-
gr.Markdown("##
|
82 |
gr.Markdown("Upload a CSV, choose a text column, adjust sentiment thresholds, and run analysis.")
|
83 |
gr.Markdown("**Citation:** Mat Roni, S. (2025). *Sentiment analysis with VADER on Gradio* (version 1.0) [software]. https://huggingface.co/spaces/pvaluedotone/VADER_sentiment_analysis")
|
84 |
|
|
|
55 |
# Plot 2: Compound score histogram
|
56 |
plt.figure(figsize=(6, 4))
|
57 |
sns.histplot(df["compound"], bins=30, kde=True, color="skyblue")
|
58 |
+
plt.title("Compound score distribution")
|
59 |
+
plt.xlabel("Compound score")
|
60 |
plt.tight_layout()
|
61 |
compound_fig = "compound_dist.png"
|
62 |
plt.savefig(compound_fig)
|
|
|
78 |
return gr.update(choices=[], value=None, label="⚠️ Error reading file")
|
79 |
|
80 |
with gr.Blocks() as app:
|
81 |
+
gr.Markdown("## Sentiment analysis with VADER")
|
82 |
gr.Markdown("Upload a CSV, choose a text column, adjust sentiment thresholds, and run analysis.")
|
83 |
gr.Markdown("**Citation:** Mat Roni, S. (2025). *Sentiment analysis with VADER on Gradio* (version 1.0) [software]. https://huggingface.co/spaces/pvaluedotone/VADER_sentiment_analysis")
|
84 |
|