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