Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -115,7 +115,7 @@ def extract_speaker(text: str) -> Tuple[Optional[str], str]:
|
|
| 115 |
if m:
|
| 116 |
sp = m.group(1).strip(); body = m.group(2).strip()
|
| 117 |
return sp, clean_text(body)
|
| 118 |
-
m = re.match(r"^\s*([A-Za-zА-Яа-яЁёІіЎў'’`-]{1}[\wА-Яа-яЁёІіЎў'’` -]{0,39})\s*[:—-]\s+(.+)$")
|
| 119 |
if m and len(m.group(1).split()) <= 5:
|
| 120 |
sp = m.group(1).strip(); body = m.group(2).strip()
|
| 121 |
return sp, clean_text(body)
|
|
|
|
| 115 |
if m:
|
| 116 |
sp = m.group(1).strip(); body = m.group(2).strip()
|
| 117 |
return sp, clean_text(body)
|
| 118 |
+
m = re.match(r"^\s*([A-Za-zА-Яа-яЁёІіЎў'’`-]{1}[\wА-Яа-яЁёІіЎў'’` -]{0,39})\s*[:—-]\s+(.+)$", text)
|
| 119 |
if m and len(m.group(1).split()) <= 5:
|
| 120 |
sp = m.group(1).strip(); body = m.group(2).strip()
|
| 121 |
return sp, clean_text(body)
|