Politrees commited on
Commit
5f76498
β€’
1 Parent(s): 94019c7

Update src/covergen.py

Browse files
Files changed (1) hide show
  1. src/covergen.py +13 -3
src/covergen.py CHANGED
@@ -1,4 +1,4 @@
1
- import os
2
  import json
3
  import shutil
4
  import urllib.request
@@ -16,13 +16,23 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
16
  rvc_models_dir = os.path.join(BASE_DIR, 'rvc_models')
17
  output_dir = os.path.join(BASE_DIR, 'song_output')
18
 
 
 
 
 
 
 
 
 
 
19
  if __name__ == '__main__':
20
  voice_models = ignore_files(rvc_models_dir)
21
 
22
  with gr.Blocks(title='CoverGen Lite - Politrees (v0.2)', theme=gr.themes.Soft(primary_hue="green", secondary_hue="green", neutral_hue="neutral", spacing_size="sm", radius_size="lg")) as app:
23
 
24
- with gr.Column(variant='panel'):
25
- gr.HTML("<center><h2>This space is running too slow due to a weak server, so I made a Google Colab notebook to work faster with this interface: <a href='https://colab.research.google.com/drive/1HzuPgICRrjqUWQWb5Zn-l07m099-n-Nr'>Google Colab Notebook</a>.</h2></center>")
 
26
 
27
  with gr.Tab("Welcome/Contacts"):
28
  gr.HTML("<center><h1>Welcome to CoverGen Lite - Politrees (v0.2)</h1></center>")
 
1
+ import os, sys
2
  import json
3
  import shutil
4
  import urllib.request
 
16
  rvc_models_dir = os.path.join(BASE_DIR, 'rvc_models')
17
  output_dir = os.path.join(BASE_DIR, 'song_output')
18
 
19
+
20
+ warning = sys.argv[1]
21
+
22
+ if warning == 'True':
23
+ warning = True
24
+ elif warning == 'False':
25
+ warning = False
26
+
27
+
28
  if __name__ == '__main__':
29
  voice_models = ignore_files(rvc_models_dir)
30
 
31
  with gr.Blocks(title='CoverGen Lite - Politrees (v0.2)', theme=gr.themes.Soft(primary_hue="green", secondary_hue="green", neutral_hue="neutral", spacing_size="sm", radius_size="lg")) as app:
32
 
33
+ if warning:
34
+ with gr.Column(variant='panel'):
35
+ gr.HTML("<center><h2>This space is running too slow due to a weak server, so I made a Google Colab notebook to work faster with this interface: <a href='https://colab.research.google.com/drive/1HzuPgICRrjqUWQWb5Zn-l07m099-n-Nr'>Google Colab Notebook</a>.</h2></center>")
36
 
37
  with gr.Tab("Welcome/Contacts"):
38
  gr.HTML("<center><h1>Welcome to CoverGen Lite - Politrees (v0.2)</h1></center>")