Deevyankar commited on
Commit
91eb53d
Β·
verified Β·
1 Parent(s): 624ba1c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -78,12 +78,9 @@ def compare_all(old_pdf, new_pdf, lo_file):
78
  }
79
  df = pd.DataFrame(data)
80
 
81
- summary = f"πŸ“ˆ Overall Content Change: {round(cosine_similarity([TfidfVectorizer().fit_transform([old_text, new_text]).toarray()[0]], [TfidfVectorizer().fit_transform([old_text, new_text]).toarray()[1]])[0][0] * 100, 2)}%
82
- "
83
- summary += f"🎯 Matched LOs: {sum(1 for s in new_scores if s >= 0.5)} of {len(los)}
84
- "
85
- summary += f"🟒 New content appears {'more' if sum(new_scores) > sum(old_scores) else 'less'} aligned with outcomes.
86
- "
87
 
88
  return summary, df, fig
89
 
 
78
  }
79
  df = pd.DataFrame(data)
80
 
81
+ summary = f"πŸ“ˆ Overall Content Change: {round(cosine_similarity([TfidfVectorizer().fit_transform([old_text, new_text]).toarray()[0]], [TfidfVectorizer().fit_transform([old_text, new_text]).toarray()[1]])[0][0] * 100, 2)}%"
82
+ summary += f"🎯 Matched LOs: {sum(1 for s in new_scores if s >= 0.5)} of {len(los)}"
83
+ summary += f"🟒 New content appears {'more' if sum(new_scores) > sum(old_scores) else 'less'} aligned with outcomes."
 
 
 
84
 
85
  return summary, df, fig
86