Politrees commited on
Commit
323a629
1 Parent(s): 97d6fae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -2,6 +2,7 @@ import subprocess, torch, os, traceback, sys, warnings, shutil, numpy as np
2
  from mega import Mega
3
  os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
4
  import threading
 
5
  from time import sleep
6
  from subprocess import Popen
7
  import faiss
@@ -2086,12 +2087,9 @@ with gr.Blocks(theme=gr.themes.Base(), title='Mangio-RVC-Web 💻') as app:
2086
 
2087
  app.queue(concurrency_count=511, max_size=1022).launch(share=False, quiet=True)
2088
 
2089
- import os, shutil
2090
- cur_dir = os.getcwd()
2091
- move_dir = os.getcwd() + '\\backup'
2092
- notmovepls = ['\\audio*.*']
2093
- cur_files = [i for i in os.listdir(cur_dir) if i not in notmovepls]
2094
- def in_folder():
2095
- for file in cur_files:
2096
- shutil.move(file, move_dir)
2097
  #endregion
 
2
  from mega import Mega
3
  os.environ["no_proxy"] = "localhost, 127.0.0.1, ::1"
4
  import threading
5
+ from pathlib import Path
6
  from time import sleep
7
  from subprocess import Popen
8
  import faiss
 
2087
 
2088
  app.queue(concurrency_count=511, max_size=1022).launch(share=False, quiet=True)
2089
 
2090
+ src_path = '\audios'
2091
+ trg_path = '\backup'
2092
+
2093
+ for src_file in Path(src_path).glob('*.*'):
2094
+ shutil.copy(src_file, trg_path)
 
 
 
2095
  #endregion