vilarin commited on
Commit
6ec7211
·
verified ·
1 Parent(s): f95ec9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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 Chinese 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 in the following JSON format directly:
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 Chinese and based on the tone of people's daily life.
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 = "zh-CN-XiaoxiaoNeural" if speaker == "Alice" else "zh-CN-YunjianNeural"
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)