Merge branch 'main' of https://huggingface.co/spaces/JammyMachina/the-jam-machine-app into main
Browse files- .gitignore +1 -0
- README.md +14 -12
- load.py +3 -0
- playground.py +3 -1
- requirements.txt +2 -1
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
__pycache__
|
README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
---
|
2 |
title: The Jam Machine
|
3 |
-
emoji:
|
4 |
colorFrom: darkblue
|
5 |
colorTo: black
|
6 |
sdk: gradio
|
@@ -10,14 +10,16 @@ app_file: playground.py
|
|
10 |
pinned: true
|
11 |
---
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
Jean Simonnet:
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
|
|
|
|
|
1 |
---
|
2 |
title: The Jam Machine
|
3 |
+
emoji: 🎶
|
4 |
colorFrom: darkblue
|
5 |
colorTo: black
|
6 |
sdk: gradio
|
|
|
10 |
pinned: true
|
11 |
---
|
12 |
|
13 |
+
[Presentation](pitch.com/public/417162a8-88b0-4472-a651-c66bb89428be)
|
14 |
+
## Contributors:
|
15 |
+
### Jean Simonnet:
|
16 |
+
- [Github](https://github.com/misnaej)
|
17 |
+
- [Linkedin](https://www.linkedin.com/in/jeansimonnet/)
|
18 |
+
|
19 |
+
### Louis Demetz:
|
20 |
+
- [Github](https://github.com/louis-demetz)
|
21 |
+
- [Linkedin](https://www.linkedin.com/in/ldemetz/)
|
22 |
+
|
23 |
+
### Halid Bayram:
|
24 |
+
- [Github](https://github.com/m41w4r3exe)
|
25 |
+
- [Linkedin](https://www.linkedin.com/in/halid-bayram-6b9ba861/)
|
load.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
from transformers import GPT2LMHeadModel
|
2 |
from transformers import PreTrainedTokenizerFast
|
3 |
import os
|
|
|
4 |
|
5 |
|
6 |
class LoadModel:
|
@@ -31,6 +32,8 @@ class LoadModel:
|
|
31 |
self.path = path
|
32 |
self.device = device
|
33 |
self.revision = revision
|
|
|
|
|
34 |
|
35 |
def load_model_and_tokenizer(self):
|
36 |
model = self.load_model()
|
|
|
1 |
from transformers import GPT2LMHeadModel
|
2 |
from transformers import PreTrainedTokenizerFast
|
3 |
import os
|
4 |
+
import torch
|
5 |
|
6 |
|
7 |
class LoadModel:
|
|
|
32 |
self.path = path
|
33 |
self.device = device
|
34 |
self.revision = revision
|
35 |
+
if torch.cuda.is_available():
|
36 |
+
self.device = "cuda"
|
37 |
|
38 |
def load_model_and_tokenizer(self):
|
39 |
model = self.load_model()
|
playground.py
CHANGED
@@ -123,7 +123,9 @@ def instrument_row(default_inst, row_id):
|
|
123 |
value=default_inst,
|
124 |
label="Instrument",
|
125 |
)
|
126 |
-
temp = gr.
|
|
|
|
|
127 |
density = gr.Dropdown([0, 1, 2, 3], value=3, label="Density")
|
128 |
|
129 |
with gr.Column(scale=3):
|
|
|
123 |
value=default_inst,
|
124 |
label="Instrument",
|
125 |
)
|
126 |
+
temp = gr.Dropdown(
|
127 |
+
[0.25, 0.5, 0.6, 0.7, 0.8], value=0.7, label="Creativity"
|
128 |
+
)
|
129 |
density = gr.Dropdown([0, 1, 2, 3], value=3, label="Density")
|
130 |
|
131 |
with gr.Column(scale=3):
|
requirements.txt
CHANGED
@@ -13,4 +13,5 @@ scipy
|
|
13 |
datetime
|
14 |
torch
|
15 |
torchvision
|
16 |
-
pyFluidSynth
|
|
|
|
13 |
datetime
|
14 |
torch
|
15 |
torchvision
|
16 |
+
pyFluidSynth
|
17 |
+
accelerate
|