jonathanagustin commited on
Commit
4943f47
1 Parent(s): 1e56787

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -1,8 +1,10 @@
1
- import gradio as gr
2
  import tempfile
3
- import openai
4
  from functools import partial
5
 
 
 
 
 
6
  def tts(
7
  input_text: str,
8
  model: str,
@@ -66,6 +68,7 @@ def tts(
66
 
67
  return temp_file_path
68
 
 
69
  def main():
70
  """
71
  Main function to create and launch the Gradio interface.
@@ -246,7 +249,12 @@ def main():
246
  :rtype: str
247
  """
248
  audio_file = tts(
249
- input_text, model.lower(), voice.lower(), api_key, response_format, speed
 
 
 
 
 
250
  )
251
  return audio_file
252
 
@@ -267,5 +275,6 @@ def main():
267
  # Launch the Gradio app with error display enabled
268
  demo.launch(show_error=True)
269
 
 
270
  if __name__ == "__main__":
271
  main()
 
 
1
  import tempfile
 
2
  from functools import partial
3
 
4
+ import gradio as gr
5
+ import openai
6
+
7
+
8
  def tts(
9
  input_text: str,
10
  model: str,
 
68
 
69
  return temp_file_path
70
 
71
+
72
  def main():
73
  """
74
  Main function to create and launch the Gradio interface.
 
249
  :rtype: str
250
  """
251
  audio_file = tts(
252
+ input_text,
253
+ model.lower(),
254
+ voice.lower(),
255
+ api_key,
256
+ response_format,
257
+ speed,
258
  )
259
  return audio_file
260
 
 
275
  # Launch the Gradio app with error display enabled
276
  demo.launch(show_error=True)
277
 
278
+
279
  if __name__ == "__main__":
280
  main()