csukuangfj commited on
Commit
ec41cb6
1 Parent(s): e332a41

small fixes

Browse files
Files changed (3) hide show
  1. app.py +3 -2
  2. requirements.txt +1 -1
  3. separate.py +2 -7
app.py CHANGED
@@ -21,15 +21,16 @@
21
 
22
  import logging
23
  import os
24
- from pydub import AudioSegment
25
  import tempfile
26
  import time
 
27
  from datetime import datetime
28
 
29
  import gradio as gr
30
  import torch
31
  import torchaudio
32
- import urllib.request
 
33
  from separate import load_audio, load_model, separate
34
 
35
 
 
21
 
22
  import logging
23
  import os
 
24
  import tempfile
25
  import time
26
+ import urllib.request
27
  from datetime import datetime
28
 
29
  import gradio as gr
30
  import torch
31
  import torchaudio
32
+ from pydub import AudioSegment
33
+
34
  from separate import load_audio, load_model, separate
35
 
36
 
requirements.txt CHANGED
@@ -2,6 +2,6 @@ https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp38-cp38-linux_x86_64.w
2
  https://download.pytorch.org/whl/cpu/torchaudio-0.13.1%2Bcpu-cp38-cp38-linux_x86_64.whl
3
 
4
  numpy
5
-
6
  huggingface_hub
7
  ffmpeg
 
2
  https://download.pytorch.org/whl/cpu/torchaudio-0.13.1%2Bcpu-cp38-cp38-linux_x86_64.whl
3
 
4
  numpy
5
+ pydub
6
  huggingface_hub
7
  ffmpeg
separate.py CHANGED
@@ -1,21 +1,16 @@
1
  #!/usr/bin/env python3
2
  # Copyright 2023 Xiaomi Corp. (authors: Fangjun Kuang)
3
 
4
- # Please see ./run.sh for usage
5
-
6
  from typing import Optional, Tuple
7
 
8
- from huggingface_hub import hf_hub_download
9
-
10
  import ffmpeg
11
  import numpy as np
12
  import torch
13
- import soundfile as sf
14
  import torchaudio
15
- from functools import lru_cache
16
  from pydub import AudioSegment
17
 
18
-
19
  from unet import UNet
20
 
21
 
 
1
  #!/usr/bin/env python3
2
  # Copyright 2023 Xiaomi Corp. (authors: Fangjun Kuang)
3
 
4
+ from functools import lru_cache
 
5
  from typing import Optional, Tuple
6
 
 
 
7
  import ffmpeg
8
  import numpy as np
9
  import torch
 
10
  import torchaudio
11
+ from huggingface_hub import hf_hub_download
12
  from pydub import AudioSegment
13
 
 
14
  from unet import UNet
15
 
16