AlekseyKorshuk commited on
Commit
cdbc599
1 Parent(s): cb0058e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -2
app.py CHANGED
@@ -8,6 +8,32 @@ import time
8
  from midi2audio import FluidSynth
9
  from scipy.io import wavfile
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  def inference(audio, num_epoch):
13
  generator = Generator()
@@ -23,7 +49,9 @@ def inference(audio, num_epoch):
23
 
24
 
25
  st.title("Accompaniment Generator")
26
- st.description = "Gradio demo for MIDI-DDSP: Detailed Control of Musical Performance via Hierarchical Modeling. To use it, simply upload your midi file, or click one of the examples to load them. Read more at the links below."
 
 
27
 
28
  article = "<p style='text-align: center'>" \
29
  "<a href='https://github.com/AlekseyKorshuk/accompaniment-generator' target='_blank'>Github Repo</a>" \
@@ -35,7 +63,7 @@ from os.path import isfile, join
35
  onlyfiles = [f for f in listdir("./examples") if isfile(join("./examples", f))]
36
 
37
  model_name = st.selectbox(
38
- 'Select example MIDI file:',
39
  onlyfiles
40
  )
41
 
 
8
  from midi2audio import FluidSynth
9
  from scipy.io import wavfile
10
 
11
+ ABOUT_TEXT = "🤗 Accompaniment Generator - generate accompaniment part with chord using Evolutionary algorithm."
12
+ CONTACT_TEXT = """
13
+ _Built by Aleksey Korshuk with love_ ❤️
14
+ [![Follow](https://img.shields.io/github/followers/AlekseyKorshuk?style=social)](https://github.com/AlekseyKorshuk)
15
+ [![Follow](https://img.shields.io/twitter/follow/alekseykorshuk?style=social)](https://twitter.com/intent/follow?screen_name=alekseykorshuk)
16
+
17
+ Star project repository:
18
+ [![GitHub stars](https://img.shields.io/github/stars/AlekseyKorshuk/accompaniment-generator?style=social)](https://github.com/AlekseyKorshuk/accompaniment-generator)
19
+ """
20
+ st.sidebar.markdown(
21
+ """
22
+ <style>
23
+ .aligncenter {
24
+ text-align: center;
25
+ }
26
+ </style>
27
+ <p class="aligncenter">
28
+ <img src="https://seeklogo.com/images/A/apple-music-logo-4FBA5FADCC-seeklogo.com.png" width="220" />
29
+ </p>
30
+ """,
31
+ unsafe_allow_html=True,
32
+ )
33
+
34
+ st.sidebar.markdown(ABOUT_TEXT)
35
+ st.sidebar.markdown(CONTACT_TEXT)
36
+
37
 
38
  def inference(audio, num_epoch):
39
  generator = Generator()
 
49
 
50
 
51
  st.title("Accompaniment Generator")
52
+
53
+ st.markdown(
54
+ "App to generate accompaniment for MIDI music file with Evolutionary algorithm. Check out [project repository](https://github.com/AlekseyKorshuk/accompaniment-generator).")
55
 
56
  article = "<p style='text-align: center'>" \
57
  "<a href='https://github.com/AlekseyKorshuk/accompaniment-generator' target='_blank'>Github Repo</a>" \
 
63
  onlyfiles = [f for f in listdir("./examples") if isfile(join("./examples", f))]
64
 
65
  model_name = st.selectbox(
66
+ 'Select example MIDI file (will be used only for empty file field):',
67
  onlyfiles
68
  )
69