Spaces:
Runtime error
Runtime error
csukuangfj
commited on
Commit
•
0a0c0c9
1
Parent(s):
ec41cb6
Small fixes
Browse files- app.py +2 -7
- requirements.txt +0 -1
app.py
CHANGED
@@ -20,7 +20,6 @@
|
|
20 |
# https://gradio.app/docs/#dropdown
|
21 |
|
22 |
import logging
|
23 |
-
import os
|
24 |
import tempfile
|
25 |
import time
|
26 |
import urllib.request
|
@@ -28,7 +27,6 @@ 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
|
@@ -137,7 +135,6 @@ def process(in_filename: str):
|
|
137 |
RTF: {end - start: .3f}/{duration: .3f} = {rtf:.3f} <br/>
|
138 |
"""
|
139 |
logging.info(info)
|
140 |
-
logging.info(f"\nrepo_id: {repo_id}\nhyp: {text}")
|
141 |
|
142 |
return vocals_filename, accompaniment_filename, build_html_output(info)
|
143 |
|
@@ -172,7 +169,7 @@ with demo:
|
|
172 |
uploaded_html_info = gr.HTML(label="Info")
|
173 |
|
174 |
gr.Examples(
|
175 |
-
examples=
|
176 |
inputs=[uploaded_file],
|
177 |
outputs=["audio", "audio", uploaded_html_info],
|
178 |
fn=process_uploaded_file,
|
@@ -190,7 +187,7 @@ with demo:
|
|
190 |
recorded_html_info = gr.HTML(label="Info")
|
191 |
|
192 |
gr.Examples(
|
193 |
-
examples=
|
194 |
inputs=[microphone],
|
195 |
outputs=["audio", "audio", recorded_html_info],
|
196 |
fn=process_microphone,
|
@@ -225,8 +222,6 @@ with demo:
|
|
225 |
outputs=["audio", "audio", url_html_info],
|
226 |
)
|
227 |
|
228 |
-
gr.Markdown(description)
|
229 |
-
|
230 |
torch.set_num_threads(1)
|
231 |
torch.set_num_interop_threads(1)
|
232 |
|
|
|
20 |
# https://gradio.app/docs/#dropdown
|
21 |
|
22 |
import logging
|
|
|
23 |
import tempfile
|
24 |
import time
|
25 |
import urllib.request
|
|
|
27 |
|
28 |
import gradio as gr
|
29 |
import torch
|
|
|
30 |
from pydub import AudioSegment
|
31 |
|
32 |
from separate import load_audio, load_model, separate
|
|
|
135 |
RTF: {end - start: .3f}/{duration: .3f} = {rtf:.3f} <br/>
|
136 |
"""
|
137 |
logging.info(info)
|
|
|
138 |
|
139 |
return vocals_filename, accompaniment_filename, build_html_output(info)
|
140 |
|
|
|
169 |
uploaded_html_info = gr.HTML(label="Info")
|
170 |
|
171 |
gr.Examples(
|
172 |
+
examples=["./yesterday-once-more-carpenters.mp3"],
|
173 |
inputs=[uploaded_file],
|
174 |
outputs=["audio", "audio", uploaded_html_info],
|
175 |
fn=process_uploaded_file,
|
|
|
187 |
recorded_html_info = gr.HTML(label="Info")
|
188 |
|
189 |
gr.Examples(
|
190 |
+
examples=["./yesterday-once-more-carpenters.mp3"],
|
191 |
inputs=[microphone],
|
192 |
outputs=["audio", "audio", recorded_html_info],
|
193 |
fn=process_microphone,
|
|
|
222 |
outputs=["audio", "audio", url_html_info],
|
223 |
)
|
224 |
|
|
|
|
|
225 |
torch.set_num_threads(1)
|
226 |
torch.set_num_interop_threads(1)
|
227 |
|
requirements.txt
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp38-cp38-linux_x86_64.whl
|
2 |
-
https://download.pytorch.org/whl/cpu/torchaudio-0.13.1%2Bcpu-cp38-cp38-linux_x86_64.whl
|
3 |
|
4 |
numpy
|
5 |
pydub
|
|
|
1 |
https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp38-cp38-linux_x86_64.whl
|
|
|
2 |
|
3 |
numpy
|
4 |
pydub
|