rehan953 commited on
Commit
a48260e
·
verified ·
1 Parent(s): fd29010

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -26,7 +26,11 @@ print("✅ config.yaml fixed")
26
  # ── STEP 2: Fix result_formatter.py on startup ───────────────
27
  with open(formatter_path, "r") as f:
28
  source = f.read()
29
- for label in ['"header"', "'header'", '"footer"', "'footer"', '"doc_header"', "'doc_header'", '"doc_footer"', "'doc_footer'"]:
 
 
 
 
30
  source = re.sub(r',\s*' + re.escape(label), '', source)
31
  source = re.sub(re.escape(label) + r'\s*,', '', source)
32
  source = re.sub(re.escape(label), '', source)
 
26
  # ── STEP 2: Fix result_formatter.py on startup ───────────────
27
  with open(formatter_path, "r") as f:
28
  source = f.read()
29
+ labels_to_remove = [
30
+ '"header"', "'header'", '"footer"', "'footer'",
31
+ '"doc_header"', "'doc_header'", '"doc_footer"', "'doc_footer'"
32
+ ]
33
+ for label in labels_to_remove:
34
  source = re.sub(r',\s*' + re.escape(label), '', source)
35
  source = re.sub(re.escape(label) + r'\s*,', '', source)
36
  source = re.sub(re.escape(label), '', source)