Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -194,7 +194,7 @@ class PodcastGenerator:
|
|
194 |
return self.create_fallback_podcast(text)
|
195 |
|
196 |
def conversation_to_json(text: str) -> Dict:
|
197 |
-
|
198 |
lines = re.findall(r'(Speaker\s[12]):\s*(.+)', text)
|
199 |
podcast = [{"speaker": int(s[-1]), "line": l.strip()} for s, l in lines]
|
200 |
return {
|
|
|
194 |
return self.create_fallback_podcast(text)
|
195 |
|
196 |
def conversation_to_json(text: str) -> Dict:
|
197 |
+
"""Convert speaker-formatted text to podcast JSON structure"""
|
198 |
lines = re.findall(r'(Speaker\s[12]):\s*(.+)', text)
|
199 |
podcast = [{"speaker": int(s[-1]), "line": l.strip()} for s, l in lines]
|
200 |
return {
|