esraa-abdelmaksoud commited on
Commit
af7559c
·
1 Parent(s): 1e4e739

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ def calculate_distance(org_text, ocr_str):
7
  org_words = org_str.split()
8
  ocr_chars = list(ocr_str)
9
  org_chars = list(org_str)
10
- cer = Levenshtein.distance(tran_chars, ocr_chars) / len(tran_chars)
11
  return return f"The Character Error Rate (CER): {cer}"
12
 
13
  iface = gradio.Interface(
 
7
  org_words = org_str.split()
8
  ocr_chars = list(ocr_str)
9
  org_chars = list(org_str)
10
+ cer = Levenshtein.distance(org_chars, ocr_chars) / len(org_chars)
11
  return return f"The Character Error Rate (CER): {cer}"
12
 
13
  iface = gradio.Interface(