Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
16 |
from moviepy.editor import AudioFileClip, concatenate_audioclips
|
17 |
|
18 |
system_prompt = '''
|
19 |
-
You are an
|
20 |
-
Please provide the script in the following JSON format
|
21 |
{
|
22 |
"title": "[string]",
|
23 |
"content": {
|
@@ -26,8 +26,8 @@ system_prompt = '''
|
|
26 |
...
|
27 |
}
|
28 |
}
|
29 |
-
Please note that the [string] you generate now must be in
|
30 |
-
No more than five rounds of conversation, be concise.
|
31 |
'''
|
32 |
|
33 |
DESCRIPTION = '''
|
@@ -98,7 +98,7 @@ async def gen_show(script):
|
|
98 |
for key, text in content.items():
|
99 |
speaker = key.split('_')[0] # Extract the speaker name
|
100 |
index = key.split('_')[1] # Extract the dialogue index
|
101 |
-
voice = "
|
102 |
|
103 |
# Create temporary file for each speaker's dialogue
|
104 |
temp_file = tempfile.NamedTemporaryFile(suffix='.mp3', delete=False)
|
|
|
16 |
from moviepy.editor import AudioFileClip, concatenate_audioclips
|
17 |
|
18 |
system_prompt = '''
|
19 |
+
You are an talkshow podcast generator. You have to create short conversations between Alice and Bob that gives an overview of the News given by the user.
|
20 |
+
Please provide the script and output strictly in the following JSON format:
|
21 |
{
|
22 |
"title": "[string]",
|
23 |
"content": {
|
|
|
26 |
...
|
27 |
}
|
28 |
}
|
29 |
+
#Please note that the [string] you generate now must be in based on the tone of people's daily life.
|
30 |
+
#No more than five rounds of conversation, be concise.
|
31 |
'''
|
32 |
|
33 |
DESCRIPTION = '''
|
|
|
98 |
for key, text in content.items():
|
99 |
speaker = key.split('_')[0] # Extract the speaker name
|
100 |
index = key.split('_')[1] # Extract the dialogue index
|
101 |
+
voice = "en-US-JennyNeural" if speaker == "Alice" else "en-US-GuyNeural"
|
102 |
|
103 |
# Create temporary file for each speaker's dialogue
|
104 |
temp_file = tempfile.NamedTemporaryFile(suffix='.mp3', delete=False)
|