Spaces:
Sleeping
Sleeping
Ryan
commited on
Commit
·
5925dce
1
Parent(s):
e5c73cc
update
Browse files
app.py
CHANGED
@@ -875,7 +875,7 @@ def create_app():
|
|
875 |
# Create horizontal bar chart
|
876 |
plt.barh([t[:20] + '...' if len(t) > 20 else t for t in terms1[::-1]], counts1[::-1])
|
877 |
plt.xlabel('Frequency')
|
878 |
-
plt.title(f'Top {viz_type.split()[0]}s Used by {model1_name}')
|
879 |
plt.tight_layout()
|
880 |
|
881 |
# Plot for the second model
|
@@ -886,7 +886,7 @@ def create_app():
|
|
886 |
# Create horizontal bar chart
|
887 |
plt.barh([t[:20] + '...' if len(t) > 20 else t for t in terms2[::-1]], counts2[::-1])
|
888 |
plt.xlabel('Frequency')
|
889 |
-
plt.title(f'Top {viz_type.split()[0]}s Used by {model2_name}')
|
890 |
plt.tight_layout()
|
891 |
|
892 |
elif viz_type == "Sentiment Analysis":
|
@@ -915,8 +915,8 @@ def create_app():
|
|
915 |
# Create sentiment bar chart
|
916 |
plt.bar(list(sentiment_scores.keys()), list(sentiment_scores.values()))
|
917 |
plt.ylim(-1, 1)
|
918 |
-
plt.ylabel('Sentiment Score (-1 to 1)')
|
919 |
-
plt.title('Sentiment Analysis Comparison')
|
920 |
plt.axhline(y=0, color='r', linestyle='-', alpha=0.3) # Add a zero line
|
921 |
|
922 |
# Save the plot to a bytes buffer
|
|
|
875 |
# Create horizontal bar chart
|
876 |
plt.barh([t[:20] + '...' if len(t) > 20 else t for t in terms1[::-1]], counts1[::-1])
|
877 |
plt.xlabel('Frequency')
|
878 |
+
plt.title(f'Harris, Top {viz_type.split()[0]}s Used by {model1_name}')
|
879 |
plt.tight_layout()
|
880 |
|
881 |
# Plot for the second model
|
|
|
886 |
# Create horizontal bar chart
|
887 |
plt.barh([t[:20] + '...' if len(t) > 20 else t for t in terms2[::-1]], counts2[::-1])
|
888 |
plt.xlabel('Frequency')
|
889 |
+
plt.title(f'Harris, Top {viz_type.split()[0]}s Used by {model2_name}')
|
890 |
plt.tight_layout()
|
891 |
|
892 |
elif viz_type == "Sentiment Analysis":
|
|
|
915 |
# Create sentiment bar chart
|
916 |
plt.bar(list(sentiment_scores.keys()), list(sentiment_scores.values()))
|
917 |
plt.ylim(-1, 1)
|
918 |
+
plt.ylabel('Harris Sentiment Score (-1 to 1)')
|
919 |
+
plt.title('Harris Sentiment Analysis Comparison')
|
920 |
plt.axhline(y=0, color='r', linestyle='-', alpha=0.3) # Add a zero line
|
921 |
|
922 |
# Save the plot to a bytes buffer
|