Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ from pedalboard.io import AudioFile
|
|
13 |
from spaces import GPU
|
14 |
import gradio as gr
|
15 |
|
16 |
-
|
17 |
|
18 |
temp_dir = 'temp'
|
19 |
os.makedirs(temp_dir, exist_ok=True)
|
@@ -82,7 +82,7 @@ def clear_midi(dir):
|
|
82 |
|
83 |
clear_midi(temp_dir)
|
84 |
|
85 |
-
|
86 |
def generate_midi(temperature, top_k):
|
87 |
start_ids = encode(start)
|
88 |
x = (torch.tensor(start_ids, dtype=torch.long, device=device)[None, ...])
|
|
|
13 |
from spaces import GPU
|
14 |
import gradio as gr
|
15 |
|
16 |
+
os.environ["SPACES_DURATION"] = "15"
|
17 |
|
18 |
temp_dir = 'temp'
|
19 |
os.makedirs(temp_dir, exist_ok=True)
|
|
|
82 |
|
83 |
clear_midi(temp_dir)
|
84 |
|
85 |
+
|
86 |
def generate_midi(temperature, top_k):
|
87 |
start_ids = encode(start)
|
88 |
x = (torch.tensor(start_ids, dtype=torch.long, device=device)[None, ...])
|