Spaces:
Running on Zero
Running on Zero
Jahmori commited on
Commit ·
98a13aa
1
Parent(s): 2f5ca3b
testing file system
Browse files
app.py
CHANGED
|
@@ -47,11 +47,13 @@ def process_audio(mixture):
|
|
| 47 |
# Name of separated file folder
|
| 48 |
sources = Path(temp_dir) / "sources"
|
| 49 |
|
|
|
|
| 50 |
# Creates separated directory
|
| 51 |
Path.mkdir(sources,exist_ok=True)
|
| 52 |
|
| 53 |
|
| 54 |
|
|
|
|
| 55 |
# ---------------------------------------------------------
|
| 56 |
# INITIALIZE MODELS
|
| 57 |
# ---------------------------------------------------------
|
|
@@ -207,14 +209,20 @@ def process_audio(mixture):
|
|
| 207 |
|
| 208 |
return spk_1, spk_2, log
|
| 209 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 210 |
demo = gr.Interface(
|
| 211 |
fn=process_audio,
|
| 212 |
inputs = gr.Audio(type="filepath", label = "Upload Mixture Audio"),
|
| 213 |
-
outputs = [gr.
|
| 214 |
title="Test Demo", description = "Testing gradio with pipeline"
|
| 215 |
)
|
| 216 |
|
| 217 |
-
|
| 218 |
-
|
| 219 |
if __name__ == "__main__":
|
| 220 |
demo.launch(allowed_paths=[str(model_path),temp_dir])
|
|
|
|
| 47 |
# Name of separated file folder
|
| 48 |
sources = Path(temp_dir) / "sources"
|
| 49 |
|
| 50 |
+
|
| 51 |
# Creates separated directory
|
| 52 |
Path.mkdir(sources,exist_ok=True)
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
+
return os.path.dirname(__file__)
|
| 57 |
# ---------------------------------------------------------
|
| 58 |
# INITIALIZE MODELS
|
| 59 |
# ---------------------------------------------------------
|
|
|
|
| 209 |
|
| 210 |
return spk_1, spk_2, log
|
| 211 |
|
| 212 |
+
# demo = gr.Interface(
|
| 213 |
+
# fn=process_audio,
|
| 214 |
+
# inputs = gr.Audio(type="filepath", label = "Upload Mixture Audio"),
|
| 215 |
+
# outputs = [gr.Audio(label="Speaker 1"),gr.Audio(label="Speaker 2"),gr.JSON(label="Logs")],
|
| 216 |
+
# title="Test Demo", description = "Testing gradio with pipeline"
|
| 217 |
+
# )
|
| 218 |
+
|
| 219 |
+
|
| 220 |
demo = gr.Interface(
|
| 221 |
fn=process_audio,
|
| 222 |
inputs = gr.Audio(type="filepath", label = "Upload Mixture Audio"),
|
| 223 |
+
outputs = [gr.Textbox()],
|
| 224 |
title="Test Demo", description = "Testing gradio with pipeline"
|
| 225 |
)
|
| 226 |
|
|
|
|
|
|
|
| 227 |
if __name__ == "__main__":
|
| 228 |
demo.launch(allowed_paths=[str(model_path),temp_dir])
|