Update main.py
Browse files
main.py
CHANGED
@@ -12,40 +12,7 @@ from utils import (
|
|
12 |
|
13 |
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
|
14 |
|
15 |
-
DESCRIPTION = """
|
16 |
-
<h1>π΅ Multitrack Midi Generator πΆ</h1>
|
17 |
-
<h3>AI-driven Music Composer: Creating Music One Instrument at a Time!</h3>
|
18 |
-
<p>This interactive application uses an AI model to generate music sequences based on a chosen genre and various user inputs. The apps constructs the piece instrument by instrument</p>
|
19 |
|
20 |
-
<div style="display: flex; justify-content: space-between;">
|
21 |
-
<div style="width: 45%; margin-right: 5%;">
|
22 |
-
<h2>Features:</h2>
|
23 |
-
<ul>
|
24 |
-
<li>πΌ Select the genre for the music.</li>
|
25 |
-
<li>π‘οΈ Use the "Temperature" slider to adjust the randomness of the music generated (higher values will produce more random outputs).</li>
|
26 |
-
<li>β±οΈ Adjust the "Tempo" slider to change the speed of the music.</li>
|
27 |
-
<li>πΉ Use the buttons to generate a new song from scratch, continue generation with the current settings, remove the last added instrument, regenerate the last added instrument with a new one, or change the tempo of the current song.</li>
|
28 |
-
</ul>
|
29 |
-
</div>
|
30 |
-
<div style="width: 45%; margin-left: 5%;">
|
31 |
-
<h2>Outputs:</h2>
|
32 |
-
<p>The app outputs the following:</p>
|
33 |
-
<ul>
|
34 |
-
<li>π§ The audio of the generated song.</li>
|
35 |
-
<li>π A MIDI file of the song.</li>
|
36 |
-
<li>π A plot of the song's sequence.</li>
|
37 |
-
<li>πΈ A list of the generated instruments.</li>
|
38 |
-
<li>π The text sequence of the song.</li>
|
39 |
-
</ul>
|
40 |
-
</div>
|
41 |
-
</div>
|
42 |
-
|
43 |
-
<hr style="margin-top: 2em; margin-bottom: 2em;">
|
44 |
-
|
45 |
-
<p>This application is built upon the inspiring work of <a href="https://www.linkedin.com/in/dr-tristan-behrens-734967a2" target="_blank">Dr. Tristan Behrens</a></p>
|
46 |
-
|
47 |
-
<p>Enjoy creating your own music!</p>
|
48 |
-
"""
|
49 |
|
50 |
# Genrs
|
51 |
genres = ["ROCK", "POP", "OTHER", "R&B/SOUL", "JAZZ", "ELECTRONIC", "RANDOM"]
|
|
|
12 |
|
13 |
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python"
|
14 |
|
|
|
|
|
|
|
|
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Genrs
|
18 |
genres = ["ROCK", "POP", "OTHER", "R&B/SOUL", "JAZZ", "ELECTRONIC", "RANDOM"]
|