Core23 commited on
Commit
2f4b5ea
1 Parent(s): 649b200

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -70,6 +70,9 @@ def generate_response(transcribed_text):
70
  )
71
  return response['choices'][0]['message']['content']
72
 
 
 
 
73
 
74
  import os
75
  import subprocess
@@ -218,9 +221,11 @@ def inference(text):
218
 
219
  return output_file
220
 
 
 
221
  def process_audio_and_respond(audio):
222
- text = transcribe(audio)
223
- response_text = generate_response(text)
224
  output_file = inference(response_text)
225
  return response_text, output_file
226
 
@@ -236,4 +241,4 @@ demo = gr.Interface(
236
  live=True,
237
  )
238
 
239
- demo.launch()
 
70
  )
71
  return response['choices'][0]['message']['content']
72
 
73
+ # ... rest of your code ...
74
+
75
+
76
 
77
  import os
78
  import subprocess
 
221
 
222
  return output_file
223
 
224
+
225
+
226
  def process_audio_and_respond(audio):
227
+ transcribed_text = transcribe(audio)
228
+ response_text = generate_response(transcribed_text)
229
  output_file = inference(response_text)
230
  return response_text, output_file
231
 
 
241
  live=True,
242
  )
243
 
244
+ demo.launch()