Rausda6 commited on
Commit
a9df8f7
·
verified ·
1 Parent(s): 55b8c49

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -661,7 +661,7 @@ Return only valid JSON. Do not include explanation, markdown, or comments.
661
 
662
  # 🔧 Sanitize malformed lines
663
  if not isinstance(clean_line, str) or len(clean_line.strip()) == 0 or clean_line.strip().startswith('"') or "{" in clean_line:
664
- add_log(f"⚠️ Malformed line detected for speaker {item['speaker']}: {repr(clean_line[:80])}")
665
  # Try to recover from JSON-like noise
666
  candidates = re.findall(r'\"line\"\s*:\s*\"([^\"]+)\"', clean_line)
667
  if candidates:
 
661
 
662
  # 🔧 Sanitize malformed lines
663
  if not isinstance(clean_line, str) or len(clean_line.strip()) == 0 or clean_line.strip().startswith('"') or "{" in clean_line:
664
+ add_log(f"⚠️ Malformed line detected for speaker {item['speaker']}: {repr(clean_line[:80])}")
665
  # Try to recover from JSON-like noise
666
  candidates = re.findall(r'\"line\"\s*:\s*\"([^\"]+)\"', clean_line)
667
  if candidates: