Deevyankar commited on
Commit
3423464
·
verified ·
1 Parent(s): c00d526

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -32,7 +32,7 @@ def compare_handouts(old_pdf, new_pdf, lo_file):
32
  if not old_text.strip() or not new_text.strip():
33
  return "❌ Could not extract text from one or both PDFs.", None, None
34
 
35
- lo_doc = lo_file.read().decode("utf-8") if isinstance(lo_file, bytes) else lo_file.read()
36
  lo_list = [line.strip() for line in lo_doc.splitlines() if line.strip()]
37
 
38
  old_scores = semantic_match(lo_list, old_text)
 
32
  if not old_text.strip() or not new_text.strip():
33
  return "❌ Could not extract text from one or both PDFs.", None, None
34
 
35
+ lo_doc = lo_file.decode("utf-8")
36
  lo_list = [line.strip() for line in lo_doc.splitlines() if line.strip()]
37
 
38
  old_scores = semantic_match(lo_list, old_text)