Opera8 commited on
Commit
1cbb0e5
·
verified ·
1 Parent(s): 1fdfbac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -253,21 +253,21 @@ def generate_full_podcast_audio_background(task_id, prompt, speakers):
253
 
254
  valid_speaker_ids = [str(s['id']).strip() for s in speakers]
255
  default_speaker_id = valid_speaker_ids[0] if valid_speaker_ids else "Charon"
256
-
257
  spk_text = "\n".join([f"- {s['id']}: {s['name']}" for s in speakers])
258
-
259
  system_prompt = f"""Act as a Professional Podcast Producer.
260
  Topic: "{prompt}"
261
  Speakers Available:
262
  {spk_text}
263
 
264
- CRITICAL INSTRUCTIONS:
265
- 1. Create a VERY LONG, in-depth, and highly detailed podcast script.
266
- 2. STRICT RULE: Keep EVERY SINGLE dialogue line SHORT. If a speaker has a lot to say, BREAK their speech into multiple separate, consecutive turns for that SAME speaker.
267
- 3. NO stage directions, NO emojis, NO brackets like [laugh] or (sigh). Plain spoken text ONLY.
268
 
269
  Output ONLY valid JSON.
270
- Format: {{"selected_speakers": ["id1", "id2"], "script": [{{"speaker_id": "id1", "dialogue": "..."}}]}}"""
 
271
 
272
  AYA_SPACE_URL = "https://coherelabs-aya-expanse.hf.space/gradio_api"
273
  MAX_ATTEMPTS = 50
 
253
 
254
  valid_speaker_ids = [str(s['id']).strip() for s in speakers]
255
  default_speaker_id = valid_speaker_ids[0] if valid_speaker_ids else "Charon"
256
+ # 1. ساخت سناریو
257
  spk_text = "\n".join([f"- {s['id']}: {s['name']}" for s in speakers])
 
258
  system_prompt = f"""Act as a Professional Podcast Producer.
259
  Topic: "{prompt}"
260
  Speakers Available:
261
  {spk_text}
262
 
263
+ CRITICAL INSTRUCTION: You must create a VERY LONG, in-depth, and highly detailed podcast script.
264
+ - Do NOT write a short summary.
265
+ - The conversation must deeply explore the topic. Make it a very long and detailed conversation, as long as necessary to fully cover the topic.
266
+ - Make the dialogue engaging and informative.
267
 
268
  Output ONLY valid JSON.
269
+ Format: {{"selected_speakers": ["id1", "id2"], "script": [{{"speaker_id": "id1", "dialogue": "..."}}]}}
270
+ Dialogue rules: No stage directions like [laugh], (sigh). Just spoken words."""
271
 
272
  AYA_SPACE_URL = "https://coherelabs-aya-expanse.hf.space/gradio_api"
273
  MAX_ATTEMPTS = 50