jiuuee commited on
Commit
dd54457
·
verified ·
1 Parent(s): 927a24e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -93,8 +93,9 @@ def transcribe(audio_filepath):
93
 
94
  # Function to generate text using LLM
95
  def generate_text(input_text):
 
96
  generation_args = {
97
- "max_new_tokens": 500,
98
  "return_full_text": True,
99
  "temperature": 0.0,
100
  "do_sample": False,
@@ -119,8 +120,11 @@ def gen_speech(text):
119
  # Combined function for Gradio interface
120
  def process_audio(audio_filepath):
121
  transcription = transcribe(audio_filepath)
 
122
  generated_text = generate_text(transcription)
 
123
  audio_output_filepath = gen_speech(generated_text)
 
124
  return transcription, generated_text, audio_output_filepath
125
 
126
  # Create Gradio interface
 
93
 
94
  # Function to generate text using LLM
95
  def generate_text(input_text):
96
+ input_text = [input_text]
97
  generation_args = {
98
+ "max_new_tokens": 300,
99
  "return_full_text": True,
100
  "temperature": 0.0,
101
  "do_sample": False,
 
120
  # Combined function for Gradio interface
121
  def process_audio(audio_filepath):
122
  transcription = transcribe(audio_filepath)
123
+ print("Done transcribing")
124
  generated_text = generate_text(transcription)
125
+ print("Done generating")
126
  audio_output_filepath = gen_speech(generated_text)
127
+ print("Done speaking")
128
  return transcription, generated_text, audio_output_filepath
129
 
130
  # Create Gradio interface