Spaces:
Running
on
Zero
Running
on
Zero
Nithya
commited on
Commit
•
8505dc9
1
Parent(s):
032023e
increased lengths for gpu
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ import gamadhani.utils.pitch_to_audio_utils as p2a
|
|
36 |
from gamadhani.utils.utils import get_device
|
37 |
|
38 |
|
39 |
-
|
40 |
pitch_path = 'models/diffusion_pitch/'
|
41 |
audio_path = 'models/pitch_to_audio/'
|
42 |
device = get_device()
|
@@ -108,7 +108,7 @@ def generate_audio(audio_model, f0s, invert_audio_fn, singers=[3], num_steps=100
|
|
108 |
|
109 |
return audio
|
110 |
|
111 |
-
@spaces.GPU(duration=
|
112 |
def generate(pitch, num_samples=1, num_steps=100, singers=[3], outfolder='temp', audio_seq_len=750, pitch_qt=None ):
|
113 |
|
114 |
logging.log(logging.INFO, 'Generate function')
|
@@ -153,7 +153,7 @@ audio_model, audio_qt, audio_seq_len, invert_audio_fn = load_audio_fns(
|
|
153 |
)
|
154 |
partial_generate = partial(generate, num_samples=1, num_steps=100, singers=[3], outfolder=None, pitch_qt=pitch_qt) # generate function with default arguments
|
155 |
|
156 |
-
@spaces.GPU(duration=
|
157 |
def set_guide_and_generate(audio):
|
158 |
global selected_prime, pitch_task_fn
|
159 |
|
|
|
36 |
from gamadhani.utils.utils import get_device
|
37 |
|
38 |
|
39 |
+
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s', force=True)
|
40 |
pitch_path = 'models/diffusion_pitch/'
|
41 |
audio_path = 'models/pitch_to_audio/'
|
42 |
device = get_device()
|
|
|
108 |
|
109 |
return audio
|
110 |
|
111 |
+
@spaces.GPU(duration=150)
|
112 |
def generate(pitch, num_samples=1, num_steps=100, singers=[3], outfolder='temp', audio_seq_len=750, pitch_qt=None ):
|
113 |
|
114 |
logging.log(logging.INFO, 'Generate function')
|
|
|
153 |
)
|
154 |
partial_generate = partial(generate, num_samples=1, num_steps=100, singers=[3], outfolder=None, pitch_qt=pitch_qt) # generate function with default arguments
|
155 |
|
156 |
+
@spaces.GPU(duration=150)
|
157 |
def set_guide_and_generate(audio):
|
158 |
global selected_prime, pitch_task_fn
|
159 |
|