easxtn commited on
Commit
89544a2
1 Parent(s): 7157202

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ def text_generation(text):
26
  tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
27
 
28
  messages = [
29
- {"role": "user", "content": text
30
  ]
31
 
32
  generation_args = {
@@ -40,7 +40,7 @@ def text_generation(text):
40
  response = text_gen(messages, **generation_args)
41
  return response[0]["generated_text"]
42
 
43
- def text_to_speech(text):
44
  text_to_audio = pipeline("text-to-speech", model="kakao-enterprise/vits-ljs")
45
  narrated_text = text_to_audio(text)
46
  return (narrated_text["sampling_rate"], narrated_text["audio"][0] )
 
26
  tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-128k-instruct")
27
 
28
  messages = [
29
+ {"role": "user", "content": text}
30
  ]
31
 
32
  generation_args = {
 
40
  response = text_gen(messages, **generation_args)
41
  return response[0]["generated_text"]
42
 
43
+ def text_to_speech(text):
44
  text_to_audio = pipeline("text-to-speech", model="kakao-enterprise/vits-ljs")
45
  narrated_text = text_to_audio(text)
46
  return (narrated_text["sampling_rate"], narrated_text["audio"][0] )