Spaces:
Running
Running
Update utils.py
Browse files
utils.py
CHANGED
@@ -54,18 +54,19 @@ def generate_script(system_prompt: str, input_text: str, tone: str, target_lengt
|
|
54 |
TARGET LENGTH: {target_length} (approximately {word_limit} words)
|
55 |
INPUT TEXT: {input_text}
|
56 |
Generate a complete, well-structured podcast script that:
|
57 |
-
1. Starts with a
|
58 |
-
2. Covers the main points from the input text in a
|
59 |
-
3.
|
60 |
-
4. Concludes with a
|
61 |
-
5. voice speed
|
62 |
6. Fits within the {word_limit} word limit for the target length of {target_length}.
|
63 |
-
7. Strongly emphasizes the {tone} tone throughout the conversation.
|
64 |
-
For a humorous tone, include jokes, puns, and playful banter,
|
65 |
-
For a casual tone, use colloquial language
|
66 |
-
For a formal tone, maintain a professional
|
67 |
-
Ensure the script
|
68 |
-
|
|
|
69 |
|
70 |
response = groq_client.chat.completions.create(
|
71 |
messages=[
|
|
|
54 |
TARGET LENGTH: {target_length} (approximately {word_limit} words)
|
55 |
INPUT TEXT: {input_text}
|
56 |
Generate a complete, well-structured podcast script that:
|
57 |
+
1. Starts with a friendly, engaging introduction that feels natural, welcoming the listeners as if Priya and Ananya are speaking directly to them.
|
58 |
+
2. Covers the main points from the input text in a conversational, relaxed manner with smooth transitions. Priya (Indian accent) and Ananya (Indian accent) should engage in a back-and-forth conversation that feels authentic and lively, as if two people are having a real interaction.
|
59 |
+
3. Voice adjustments: Ensure that the flow of conversation is natural, with slight pauses for thought and clear enunciation, making it easy for all listeners to follow along. Keep the pace relaxed but steady, with slight variations in speed for emphasis on key points—ensuring clarity and ease of understanding.
|
60 |
+
4. Concludes with a smooth and heartfelt summary, wrapping up the discussion in a way that feels genuine and leaves listeners with a sense of closure, while thanking them for tuning in.
|
61 |
+
5. The overall voice speed and tone should match the conversation and topic, ensuring the dialogue is easy to comprehend. For more intense moments, you can use a slightly faster pace for energy, and for reflective points, use a slower, thoughtful pace.
|
62 |
6. Fits within the {word_limit} word limit for the target length of {target_length}.
|
63 |
+
7. Strongly emphasizes the {tone} tone throughout the conversation.
|
64 |
+
For a humorous tone, include jokes, puns, and playful banter, making the conversation feel light-hearted while integrating subtle cultural references and humor that listeners can relate to.
|
65 |
+
For a casual tone, use colloquial language and friendly expressions that make it feel like a relaxed, informal chat between friends. Include cultural references and inside jokes to keep the conversation fun.
|
66 |
+
For a formal tone, maintain a professional style with clear, structured arguments, presenting information with respect and authority, but still keeping the conversation friendly and accessible.
|
67 |
+
Ensure the script feels like a real, flowing podcast conversation without abrupt transitions or unnatural interruptions.
|
68 |
+
"""
|
69 |
+
|
70 |
|
71 |
response = groq_client.chat.completions.create(
|
72 |
messages=[
|