Nick1 commited on
Commit
69c5a4a
·
verified ·
1 Parent(s): c156672

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -91,8 +91,8 @@ def create_vc_fn(model_name, tgt_sr, net_g, vc, if_f0, version, file_index):
91
  return "You need to upload an audio", None
92
  sampling_rate, audio = vc_upload
93
  duration = audio.shape[0] / sampling_rate
94
- if duration > 900 and spaces:
95
- return "Please upload an audio file that is less than 90 seconds. If you need to generate a longer audio file, please use Colab.", None
96
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
97
  if len(audio.shape) > 1:
98
  audio = librosa.to_mono(audio.transpose(1, 0))
@@ -251,9 +251,7 @@ if __name__ == '__main__':
251
  with gr.Blocks() as app:
252
  gr.Markdown(
253
  "<div align='center'>\n\n"+
254
- "# Model RVC\n\n"+
255
- " kalau upload Audio sampai 90 ada lambat sikit\n\n"+
256
- " guna pm saja kalau guna harvest slow betul\n\n"+
257
  "[![Repository](https://img.shields.io/badge/Github-Multi%20Model%20RVC%20Inference-blue?style=for-the-badge&logo=github)](https://github.com/ArkanDash/Multi-Model-RVC-Inference)\n\n"+
258
  "</div>"
259
  )
 
91
  return "You need to upload an audio", None
92
  sampling_rate, audio = vc_upload
93
  duration = audio.shape[0] / sampling_rate
94
+ if duration > 20 and spaces:
95
+ return "Please upload an audio file that is less than 20 seconds. If you need to generate a longer audio file, please use Colab.", None
96
  audio = (audio / np.iinfo(audio.dtype).max).astype(np.float32)
97
  if len(audio.shape) > 1:
98
  audio = librosa.to_mono(audio.transpose(1, 0))
 
251
  with gr.Blocks() as app:
252
  gr.Markdown(
253
  "<div align='center'>\n\n"+
254
+ "# Multi Model RVC Inference\n\n"+
 
 
255
  "[![Repository](https://img.shields.io/badge/Github-Multi%20Model%20RVC%20Inference-blue?style=for-the-badge&logo=github)](https://github.com/ArkanDash/Multi-Model-RVC-Inference)\n\n"+
256
  "</div>"
257
  )