Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,11 @@ def generate_graphs(new_story):
|
|
39 |
|
40 |
# Retrieve the LikesCount for the top 5 most similar stories
|
41 |
likes_distribution = encoded_df.iloc[top_5_indices]['likesCount'].values
|
42 |
-
sorted_likes_distribution = sorted(likes_distribution, reverse=True)
|
43 |
|
44 |
# Create a bar graph for the distribution of the 5 most similar stories
|
45 |
plt.figure(figsize=(10, 6))
|
46 |
-
sns.barplot(x=[f"Story {i+1}" for i in range(5)], y=
|
47 |
plt.title("LikesCount Distribution for the 5 Most Similar Stories", fontsize=14)
|
48 |
plt.xlabel("Story Similarity (Most Similar to Least)", fontsize=12)
|
49 |
plt.ylabel("LikesCount", fontsize=12)
|
|
|
39 |
|
40 |
# Retrieve the LikesCount for the top 5 most similar stories
|
41 |
likes_distribution = encoded_df.iloc[top_5_indices]['likesCount'].values
|
42 |
+
# sorted_likes_distribution = sorted(likes_distribution, reverse=True)
|
43 |
|
44 |
# Create a bar graph for the distribution of the 5 most similar stories
|
45 |
plt.figure(figsize=(10, 6))
|
46 |
+
sns.barplot(x=[f"Story {i+1}" for i in range(5)], y=likes_distribution, palette="viridis")
|
47 |
plt.title("LikesCount Distribution for the 5 Most Similar Stories", fontsize=14)
|
48 |
plt.xlabel("Story Similarity (Most Similar to Least)", fontsize=12)
|
49 |
plt.ylabel("LikesCount", fontsize=12)
|