Spaces:
Running
on
Zero
Running
on
Zero
asigalov61
commited on
Commit
•
45454da
1
Parent(s):
f3c819f
Update app.py
Browse files
app.py
CHANGED
@@ -1,26 +1,23 @@
|
|
1 |
-
|
|
|
|
|
2 |
|
3 |
import os
|
4 |
import time as reqtime
|
5 |
import datetime
|
6 |
from pytz import timezone
|
7 |
|
8 |
-
import torch
|
9 |
-
|
10 |
import spaces
|
11 |
import gradio as gr
|
12 |
|
|
|
13 |
from x_transformer_1_23_2 import *
|
14 |
import random
|
15 |
-
import tqdm
|
16 |
|
17 |
-
from midi_to_colab_audio import midi_to_colab_audio
|
18 |
import TMIDIX
|
19 |
|
20 |
-
|
21 |
|
22 |
-
in_space = os.getenv("SYSTEM") == "spaces"
|
23 |
-
|
24 |
# =================================================================================================
|
25 |
|
26 |
@spaces.GPU
|
@@ -200,16 +197,13 @@ if __name__ == "__main__":
|
|
200 |
|
201 |
soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
|
202 |
|
203 |
-
print('Loading seed meldoies data...')
|
204 |
-
seed_melodies_data = TMIDIX.Tegridy_Any_Pickle_File_Reader('Melody2Song_Seq2Seq_Music_Transformer_Seed_Melodies_Data')
|
205 |
-
print('=' * 70)
|
206 |
-
|
207 |
app = gr.Blocks()
|
|
|
208 |
with app:
|
209 |
-
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>
|
210 |
-
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate unique
|
211 |
gr.Markdown(
|
212 |
-
"![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.
|
213 |
|
214 |
input_melody_seed_number = gr.Slider(0, 203664, value=0, step=1, label="Select seed melody number")
|
215 |
|
|
|
1 |
+
#=======================================================================
|
2 |
+
# https://huggingface.co/spaces/asigalov61/Guided-Rock-Music-Transformer
|
3 |
+
#=======================================================================
|
4 |
|
5 |
import os
|
6 |
import time as reqtime
|
7 |
import datetime
|
8 |
from pytz import timezone
|
9 |
|
|
|
|
|
10 |
import spaces
|
11 |
import gradio as gr
|
12 |
|
13 |
+
import torch
|
14 |
from x_transformer_1_23_2 import *
|
15 |
import random
|
|
|
16 |
|
|
|
17 |
import TMIDIX
|
18 |
|
19 |
+
from midi_to_colab_audio import midi_to_colab_audio
|
20 |
|
|
|
|
|
21 |
# =================================================================================================
|
22 |
|
23 |
@spaces.GPU
|
|
|
197 |
|
198 |
soundfont = "SGM-v2.01-YamahaGrand-Guit-Bass-v2.7.sf2"
|
199 |
|
|
|
|
|
|
|
|
|
200 |
app = gr.Blocks()
|
201 |
+
|
202 |
with app:
|
203 |
+
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Guided Rock Music Transformer/h1>")
|
204 |
+
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate unique rock music compositions with source augmented RoPE music transformer</h1>")
|
205 |
gr.Markdown(
|
206 |
+
"![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Guided-Rock-Music-Transformer&style=flat)\n\n")
|
207 |
|
208 |
input_melody_seed_number = gr.Slider(0, 203664, value=0, step=1, label="Select seed melody number")
|
209 |
|