batuhanozkose commited on
Commit
f00a638
·
1 Parent(s): da907f8

fix: Resolve UI bugs and add performance warnings

Browse files

- Clear history.json and add to gitignore (no local history in Space)
- Fix Settings visibility toggles for Gradio 6 (dict->list return)
- Add performance warning for Supertonic CPU-based TTS

Files changed (3) hide show
  1. .gitignore +1 -0
  2. app.py +10 -10
  3. output/history.json +1 -72
.gitignore CHANGED
@@ -48,6 +48,7 @@ Thumbs.db
48
  cache/
49
  outputs/
50
  temp/
 
51
 
52
  # HuggingFace
53
  .cache/
 
48
  cache/
49
  outputs/
50
  temp/
51
+ output/history.json
52
 
53
  # HuggingFace
54
  .cache/
app.py CHANGED
@@ -555,10 +555,10 @@ def main():
555
  openai_model = gr.Textbox(label="Model", value="gpt-4o-mini")
556
 
557
  def toggle_llm(choice):
558
- return {
559
- own_group: gr.update(visible=choice=="Own Inference"),
560
- openai_group: gr.update(visible=choice=="OpenAI")
561
- }
562
  llm_choice.change(toggle_llm, llm_choice, [own_group, openai_group])
563
 
564
  with gr.Column():
@@ -568,7 +568,7 @@ def main():
568
  ["ElevenLabs", "Supertonic (CPU)"],
569
  value="ElevenLabs",
570
  label="TTS Provider",
571
- info="Supertonic runs on CPU, no API key required"
572
  )
573
 
574
  # ElevenLabs Settings
@@ -587,7 +587,7 @@ def main():
587
 
588
  # Supertonic Settings
589
  with gr.Group(visible=False) as supertonic_group:
590
- gr.Markdown("**CPU-based TTS** (no API key required)")
591
  host_voice_supertonic = gr.Dropdown(
592
  choices=list(SUPERTONIC_VOICES.keys()),
593
  value="M1 (Male 1)",
@@ -607,10 +607,10 @@ def main():
607
 
608
  def toggle_tts_provider(choice):
609
  is_elevenlabs = choice == "ElevenLabs"
610
- return {
611
- elevenlabs_group: gr.update(visible=is_elevenlabs),
612
- supertonic_group: gr.update(visible=not is_elevenlabs)
613
- }
614
 
615
  def update_voices_on_tts_change(choice):
616
  """Update voice IDs when TTS provider changes"""
 
555
  openai_model = gr.Textbox(label="Model", value="gpt-4o-mini")
556
 
557
  def toggle_llm(choice):
558
+ return [
559
+ gr.update(visible=choice=="Own Inference"), # own_group
560
+ gr.update(visible=choice=="OpenAI") # openai_group
561
+ ]
562
  llm_choice.change(toggle_llm, llm_choice, [own_group, openai_group])
563
 
564
  with gr.Column():
 
568
  ["ElevenLabs", "Supertonic (CPU)"],
569
  value="ElevenLabs",
570
  label="TTS Provider",
571
+ info="Supertonic runs on CPU (no API key required, but may be slower than cloud-based TTS)"
572
  )
573
 
574
  # ElevenLabs Settings
 
587
 
588
  # Supertonic Settings
589
  with gr.Group(visible=False) as supertonic_group:
590
+ gr.Markdown("**CPU-based TTS** (no API key required)\n\n⚠️ *Note: CPU processing may be slower than cloud-based services*")
591
  host_voice_supertonic = gr.Dropdown(
592
  choices=list(SUPERTONIC_VOICES.keys()),
593
  value="M1 (Male 1)",
 
607
 
608
  def toggle_tts_provider(choice):
609
  is_elevenlabs = choice == "ElevenLabs"
610
+ return [
611
+ gr.update(visible=is_elevenlabs), # elevenlabs_group
612
+ gr.update(visible=not is_elevenlabs) # supertonic_group
613
+ ]
614
 
615
  def update_voices_on_tts_change(choice):
616
  """Update voice IDs when TTS provider changes"""
output/history.json CHANGED
@@ -1,72 +1 @@
1
- [
2
- {
3
- "url": "https://arxiv.org/abs/2511.14650",
4
- "audio_path": "/home/batuhan/lab/papercast/output/podcast.wav",
5
- "script_length": "N/A",
6
- "timestamp": "2025-11-19 16:32:00",
7
- "audio_filename": "podcast.wav"
8
- },
9
- {
10
- "url": "https://www.medrxiv.org/content/10.1101/2025.11.14.25340242v1",
11
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_170124.wav",
12
- "script_length": 11,
13
- "timestamp": "2025-11-19 17:01:24",
14
- "audio_filename": "podcast_20251119_170124.wav"
15
- },
16
- {
17
- "url": "Uploaded PDF",
18
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_170817.wav",
19
- "script_length": 13,
20
- "timestamp": "2025-11-19 17:08:17",
21
- "audio_filename": "podcast_20251119_170817.wav"
22
- },
23
- {
24
- "url": "https://arxiv.org/abs/2511.14650",
25
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_210844.wav",
26
- "script_length": 15,
27
- "timestamp": "2025-11-19 21:08:44",
28
- "audio_filename": "podcast_20251119_210844.wav"
29
- },
30
- {
31
- "url": "https://arxiv.org/abs/2401.08406",
32
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_212141.wav",
33
- "script_length": 14,
34
- "timestamp": "2025-11-19 21:21:41",
35
- "audio_filename": "podcast_20251119_212141.wav"
36
- },
37
- {
38
- "url": "https://arxiv.org/abs/1706.03762",
39
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_230027.wav",
40
- "script_length": 12,
41
- "timestamp": "2025-11-19 23:00:27",
42
- "audio_filename": "podcast_20251119_230027.wav"
43
- },
44
- {
45
- "url": "https://arxiv.org/abs/2303.08774",
46
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_230323.wav",
47
- "script_length": 17,
48
- "timestamp": "2025-11-19 23:03:23",
49
- "audio_filename": "podcast_20251119_230323.wav"
50
- },
51
- {
52
- "url": "https://www.medrxiv.org/content/10.1101/2025.05.25.25328317v2",
53
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251119_230742.wav",
54
- "script_length": 11,
55
- "timestamp": "2025-11-19 23:07:42",
56
- "audio_filename": "podcast_20251119_230742.wav"
57
- },
58
- {
59
- "url": "https://arxiv.org/abs/2204.06125",
60
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251121_221210.wav",
61
- "script_length": 21,
62
- "timestamp": "2025-11-21 22:12:10",
63
- "audio_filename": "podcast_20251121_221210.wav"
64
- },
65
- {
66
- "url": "https://arxiv.org/abs/2303.08774",
67
- "audio_path": "/home/batuhan/lab/papercast/output/podcast_20251123_195313.wav",
68
- "script_length": 17,
69
- "timestamp": "2025-11-23 19:53:13",
70
- "audio_filename": "podcast_20251123_195313.wav"
71
- }
72
- ]
 
1
+ []