lukewys commited on
Commit
4184c46
1 Parent(s): 4eeee10

Add application file

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -6,8 +6,8 @@ os.system("midi_ddsp_download_model_weights")
6
 
7
  def inference(audio):
8
  os.system("midi_ddsp_synthesize --midi_path "+audio.name)
9
- return f'{os.path.dirname(os.path.abspath(__file__))}+{Path(audio.name).stem}+/0_mix.wav'
10
-
11
  title = "Midi-DDSP"
12
  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."
13
 
@@ -16,12 +16,11 @@ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.093
16
  examples=['input.mid']
17
 
18
  gr.Interface(
19
- inference,
20
- gr.inputs.File(type="file", label="Input"),
21
  [gr.outputs.Audio(type="file", label="Output")],
22
  title=title,
23
  description=description,
24
  article=article,
25
- examples=examples,
26
- enable_queue=True
27
- ).launch(debug=True)
 
6
 
7
  def inference(audio):
8
  os.system("midi_ddsp_synthesize --midi_path "+audio.name)
9
+ return f'{os.path.dirname(os.path.abspath(__file__))}/{Path(audio.name).stem}/0_mix.wav'
10
+
11
  title = "Midi-DDSP"
12
  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."
13
 
 
16
  examples=['input.mid']
17
 
18
  gr.Interface(
19
+ inference,
20
+ gr.inputs.File(type="file", label="Input"),
21
  [gr.outputs.Audio(type="file", label="Output")],
22
  title=title,
23
  description=description,
24
  article=article,
25
+ examples=examples
26
+ ).launch(debug=True, enable_queue=True)