ayf3 commited on
Commit
6699d9a
·
verified ·
1 Parent(s): 8890e03

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -1,7 +1,7 @@
1
  #!/usr/bin/env python3
2
  """
3
- NumberBlocks One Voice Cloner - V4 Minimal
4
- Ultra-simple UI to avoid gradio schema issues
5
  """
6
 
7
  import os
@@ -213,7 +213,7 @@ class HiFiGANGenerator(nn.Module):
213
 
214
 
215
  # ============================================================
216
- # Mel utilities
217
  # ============================================================
218
 
219
  def compute_mel(y, sample_rate=40000, n_fft=1024, hop_length=256, n_mels=80):
@@ -377,13 +377,12 @@ class VoiceCloner:
377
 
378
 
379
  # ============================================================
380
- # Gradio UI - Minimal version using Interface (not Blocks)
381
  # ============================================================
382
 
383
  print("Initializing NumberBlocks One Voice Cloner...")
384
  cloner = VoiceCloner()
385
 
386
- # Use simple gr.Interface instead of Blocks to avoid schema issues
387
  vc_interface = gr.Interface(
388
  fn=cloner.process_audio,
389
  inputs=[
@@ -416,4 +415,5 @@ demo = gr.TabbedInterface(
416
  ["Voice Conversion", "Random Sample"],
417
  )
418
 
419
- demo.launch(server_name="0.0.0.0", server_port=7860)
 
 
1
  #!/usr/bin/env python3
2
  """
3
+ NumberBlocks One Voice Cloner - V5 Fixed
4
+ Pinned gradio version to avoid jinja2 schema bugs
5
  """
6
 
7
  import os
 
213
 
214
 
215
  # ============================================================
216
+ # Mel utilities (no librosa)
217
  # ============================================================
218
 
219
  def compute_mel(y, sample_rate=40000, n_fft=1024, hop_length=256, n_mels=80):
 
377
 
378
 
379
  # ============================================================
380
+ # Gradio UI
381
  # ============================================================
382
 
383
  print("Initializing NumberBlocks One Voice Cloner...")
384
  cloner = VoiceCloner()
385
 
 
386
  vc_interface = gr.Interface(
387
  fn=cloner.process_audio,
388
  inputs=[
 
415
  ["Voice Conversion", "Random Sample"],
416
  )
417
 
418
+ if __name__ == "__main__":
419
+ demo.launch(server_name="0.0.0.0", server_port=7860)