fdaudens HF Staff commited on
Commit
e24b277
ยท
1 Parent(s): c301481
Files changed (2) hide show
  1. .gitignore +2 -0
  2. app.py +2 -7
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ podcasts/*.mp3
2
+ podcasts/*.wav
app.py CHANGED
@@ -172,6 +172,7 @@ def generate_podcast(topic: str):
172
  t1 = time.time()
173
  print(f"PROCESSED '{utterance}' in {int(t1-t0)} seconds. MP3 conversion completed.")
174
 
 
175
 
176
  EXAMPLES = [
177
  ["https://huggingface.co/blog/inference-providers-cohere", None, "How does using this compare with other inference solutions?"],
@@ -189,13 +190,7 @@ Based on [Kokoro TTS](https://huggingface.co/hexgrad/Kokoro-82M) and [Llama-3.3-
189
  placeholder="You can leave this blank for a general discussion.",
190
  ),
191
  ],
192
- outputs=[
193
- gr.Audio(
194
- label="Listen to your podcast! ๐Ÿ”Š",
195
- format="mp3",
196
- streaming=True,
197
- ),
198
- ],
199
  theme=gr.themes.Soft(),
200
  submit_btn="Generate podcast ๐ŸŽ™๏ธ",
201
  )
 
172
  t1 = time.time()
173
  print(f"PROCESSED '{utterance}' in {int(t1-t0)} seconds. MP3 conversion completed.")
174
 
175
+ return temp_mp3_path # Return the path to the MP3 file
176
 
177
  EXAMPLES = [
178
  ["https://huggingface.co/blog/inference-providers-cohere", None, "How does using this compare with other inference solutions?"],
 
190
  placeholder="You can leave this blank for a general discussion.",
191
  ),
192
  ],
193
+ outputs=gr.Audio(type="filepath"),
 
 
 
 
 
 
194
  theme=gr.themes.Soft(),
195
  submit_btn="Generate podcast ๐ŸŽ™๏ธ",
196
  )