misnaej commited on
Commit
0876ff3
2 Parent(s): d08186b 058ab19

Merge branch 'main' of https://huggingface.co/spaces/JammyMachina/the-jam-machine-app into main

Browse files
Files changed (5) hide show
  1. .gitignore +1 -0
  2. README.md +14 -12
  3. load.py +3 -0
  4. playground.py +3 -1
  5. 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
- Contributors:
14
-
15
- Jean Simonnet:
16
- https://github.com/misnaej
17
- https://www.linkedin.com/in/jeansimonnet/
18
- Louis Demetz:
19
- https://github.com/louis-demetz
20
- https://www.linkedin.com/in/ldemetz/
21
- Halid Bayram:
22
- https://github.com/m41w4r3exe
23
- https://www.linkedin.com/in/halid-bayram-6b9ba861/
 
 
 
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.Number(value=0.7, label="Creativity")
 
 
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