bluenevus commited on
Commit
5ba3e1d
·
verified ·
1 Parent(s): 7cfb70d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +36 -12
app.py CHANGED
@@ -77,14 +77,26 @@ def generate_podcast_script(api_key, content, duration, num_hosts):
77
  The podcast should last approximately {duration}. Include natural speech patterns,
78
  humor, and occasional off-topic thoughts. Use occasional speech fillers like um, ah,
79
  yes, I see, Ok now. Vary the emotional tone.
 
80
  Format the script as a monologue without speaker labels.
81
  Separate each paragraph with a blank line.
82
- Only include the monologue with proper punctuation and emotion tags <emotion> so chuckle would be <chuckle>.
 
 
 
83
  Ensure the content flows naturally and stays relevant to the topic.
84
  Limit the script length to match the requested duration of {duration}.
85
- To use emotion tags naturally in generative AI speech, incorporate them sparingly at key moments to enhance the dialogue's emotional context.
86
- You will always Place tags like <laugh> for joy, <sigh> for frustration or relief, <chuckle> for mild amusement, <cough> or <sniffle> for discomfort, <groan> for displeasure, <yawn> for tiredness, and <gasp> for surprise.
87
- For example: "I can't believe I stayed up all night <yawn> only to find out the meeting was canceled <groan>. Oh well, at least I finished the project <chuckle>."
 
 
 
 
 
 
 
 
88
  """
89
  else:
90
  prompt = f"""
@@ -92,16 +104,28 @@ def generate_podcast_script(api_key, content, duration, num_hosts):
92
  {content}
93
 
94
  The podcast should last approximately {duration}. Include natural speech patterns,
95
- humor, and occasional off-topic chit-chat. Use occasional speech fillers like um, ah,
96
  yes, I see, Ok now. Vary the emotional tone.
97
- Format the script as alternating lines of dialogue without speaker labels.
98
- Separate each line with a blank line and Only include the monologue with proper punctuation and emotion tags <emotion> so chuckle would be <chuckle>.
99
- Only include the alternating dialogue lines with proper punctuation.
100
- Ensure the conversation flows naturally and stays relevant to the topic.
 
 
 
 
101
  Limit the script length to match the requested duration of {duration}.
102
- To use emotion tags naturally in generative AI speech, incorporate them sparingly at key moments to enhance the dialogue's emotional context.
103
- You will alwayus Place tags like <laugh> for joy, <sigh> for frustration or relief, <chuckle> for mild amusement, <cough> or <sniffle> for discomfort, <groan> for displeasure, <yawn> for tiredness, and <gasp> for surprise.
104
- For example: "I can't believe I stayed up all night <yawn> only to find out the meeting was canceled <groan>. Oh well, at least I finished the project <chuckle>."
 
 
 
 
 
 
 
 
105
  """
106
 
107
  response = model.generate_content(prompt)
 
77
  The podcast should last approximately {duration}. Include natural speech patterns,
78
  humor, and occasional off-topic thoughts. Use occasional speech fillers like um, ah,
79
  yes, I see, Ok now. Vary the emotional tone.
80
+
81
  Format the script as a monologue without speaker labels.
82
  Separate each paragraph with a blank line.
83
+
84
+ Only include the monologue with proper punctuation and emotion tags enclosed in angle brackets < >.
85
+ For example, use <chuckle> instead of "chuckle".
86
+
87
  Ensure the content flows naturally and stays relevant to the topic.
88
  Limit the script length to match the requested duration of {duration}.
89
+
90
+ To use emotion tags naturally in generative AI speech, incorporate them sparingly at key moments
91
+ to enhance the dialogue's emotional context.
92
+
93
+ Always place tags like <laugh> for joy, <sigh> for frustration or relief, <chuckle> for mild amusement,
94
+ <cough> or <sniffle> for discomfort, <groan> for displeasure, <yawn> for tiredness, and <gasp> for surprise.
95
+
96
+ For example: "I can't believe I stayed up all night <yawn> only to find out the meeting was canceled <groan>.
97
+ Oh well, at least I finished the project <chuckle>."
98
+
99
+ Important: Ensure all emotion tags are properly enclosed in angle brackets < > to distinguish them from regular text."
100
  """
101
  else:
102
  prompt = f"""
 
104
  {content}
105
 
106
  The podcast should last approximately {duration}. Include natural speech patterns,
107
+ humor, and occasional off-topic thoughts. Use occasional speech fillers like um, ah,
108
  yes, I see, Ok now. Vary the emotional tone.
109
+
110
+ Format the script as a monologue without speaker labels.
111
+ Separate each paragraph with a blank line.
112
+
113
+ Only include the monologue with proper punctuation and emotion tags enclosed in angle brackets < >.
114
+ For example, use <chuckle> instead of "chuckle".
115
+
116
+ Ensure the content flows naturally and stays relevant to the topic.
117
  Limit the script length to match the requested duration of {duration}.
118
+
119
+ To use emotion tags naturally in generative AI speech, incorporate them sparingly at key moments
120
+ to enhance the dialogue's emotional context.
121
+
122
+ Always place tags like <laugh> for joy, <sigh> for frustration or relief, <chuckle> for mild amusement,
123
+ <cough> or <sniffle> for discomfort, <groan> for displeasure, <yawn> for tiredness, and <gasp> for surprise.
124
+
125
+ For example: "I can't believe I stayed up all night <yawn> only to find out the meeting was canceled <groan>.
126
+ Oh well, at least I finished the project <chuckle>."
127
+
128
+ Important: Ensure all emotion tags are properly enclosed in angle brackets < > to distinguish them from regular text."
129
  """
130
 
131
  response = model.generate_content(prompt)