Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -121,7 +121,7 @@ def plot_comparison(matched_knowledge, unmatched_knowledge):
|
|
121 |
|
122 |
def plot_pie_chart(ranked_knowledge, threshold=50):
|
123 |
# Filter terms above the threshold
|
124 |
-
filtered_terms = [term for term in ranked_knowledge if term["Score"]
|
125 |
matched_terms = sum(1 for term in filtered_terms if term["In Resume"] == "Yes")
|
126 |
unmatched_terms = len(filtered_terms) - matched_terms
|
127 |
|
@@ -132,7 +132,7 @@ def plot_pie_chart(ranked_knowledge, threshold=50):
|
|
132 |
# Create pie chart
|
133 |
plt.figure(figsize=(6, 4))
|
134 |
plt.pie(values, labels=labels, autopct='%1.1f%%', colors=['green', 'red'], startangle=90)
|
135 |
-
plt.title(f"Terms Above Threshold (Score
|
136 |
buf = BytesIO()
|
137 |
plt.savefig(buf, format='png')
|
138 |
buf.seek(0)
|
|
|
121 |
|
122 |
def plot_pie_chart(ranked_knowledge, threshold=50):
|
123 |
# Filter terms above the threshold
|
124 |
+
filtered_terms = [term for term in ranked_knowledge if term["Score"] > threshold]
|
125 |
matched_terms = sum(1 for term in filtered_terms if term["In Resume"] == "Yes")
|
126 |
unmatched_terms = len(filtered_terms) - matched_terms
|
127 |
|
|
|
132 |
# Create pie chart
|
133 |
plt.figure(figsize=(6, 4))
|
134 |
plt.pie(values, labels=labels, autopct='%1.1f%%', colors=['green', 'red'], startangle=90)
|
135 |
+
plt.title(f"Terms Above Threshold (Score > {threshold})")
|
136 |
buf = BytesIO()
|
137 |
plt.savefig(buf, format='png')
|
138 |
buf.seek(0)
|