asigalov61
commited on
Commit
•
93e4264
1
Parent(s):
7622f7a
Update app.py
Browse files
app.py
CHANGED
@@ -22,7 +22,7 @@ def GenerateMIDI():
|
|
22 |
start_tokens = [3087, 3073+1, 3075+1]
|
23 |
seq_len = 512
|
24 |
max_seq_len = 2048
|
25 |
-
temperature = 0
|
26 |
verbose=False
|
27 |
return_prime=False
|
28 |
progress=gr.Progress()
|
@@ -46,9 +46,7 @@ def GenerateMIDI():
|
|
46 |
|
47 |
logits = torch.FloatTensor(session.run(None, {'input': [torch_in]})[0])[:, -1]
|
48 |
|
49 |
-
|
50 |
-
|
51 |
-
probs = F.softmax(filtered_logits / temperature, dim=-1)
|
52 |
|
53 |
sample = torch.multinomial(probs, 1)
|
54 |
|
|
|
22 |
start_tokens = [3087, 3073+1, 3075+1]
|
23 |
seq_len = 512
|
24 |
max_seq_len = 2048
|
25 |
+
temperature = 1.0
|
26 |
verbose=False
|
27 |
return_prime=False
|
28 |
progress=gr.Progress()
|
|
|
46 |
|
47 |
logits = torch.FloatTensor(session.run(None, {'input': [torch_in]})[0])[:, -1]
|
48 |
|
49 |
+
probs = F.softmax(logits / temperature, dim=-1)
|
|
|
|
|
50 |
|
51 |
sample = torch.multinomial(probs, 1)
|
52 |
|