asigalov61
commited on
Commit
•
d8cfd0d
1
Parent(s):
e1d0c17
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def GenerateSong(input_melody_seed_number):
|
|
78 |
print('=' * 70)
|
79 |
print('Generating...')
|
80 |
|
81 |
-
x = (torch.tensor(
|
82 |
|
83 |
with ctx:
|
84 |
out = model.generate(x,
|
@@ -207,7 +207,7 @@ if __name__ == "__main__":
|
|
207 |
app = gr.Blocks()
|
208 |
with app:
|
209 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Melody2Song Seq2Seq Music Transformer</h1>")
|
210 |
-
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate unique songs from melodies with
|
211 |
gr.Markdown(
|
212 |
"![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Melody2Song-Seq2Seq-Music-Transformer&style=flat)\n\n")
|
213 |
|
|
|
78 |
print('=' * 70)
|
79 |
print('Generating...')
|
80 |
|
81 |
+
x = (torch.tensor(seed_melody, dtype=torch.long, device='cuda')[None, ...])
|
82 |
|
83 |
with ctx:
|
84 |
out = model.generate(x,
|
|
|
207 |
app = gr.Blocks()
|
208 |
with app:
|
209 |
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Melody2Song Seq2Seq Music Transformer</h1>")
|
210 |
+
gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate unique songs from melodies with seq2seq music transformer</h1>")
|
211 |
gr.Markdown(
|
212 |
"![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Melody2Song-Seq2Seq-Music-Transformer&style=flat)\n\n")
|
213 |
|