asigalov61 commited on
Commit
ff50814
1 Parent(s): 7d723ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -23,7 +23,7 @@ in_space = os.getenv("SYSTEM") == "spaces"
23
  # =================================================================================================
24
 
25
  @spaces.GPU
26
- def Text_to_Music(input_title, input_num_tokens, input_prompt_type):
27
  print('=' * 70)
28
  print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
29
  start_time = reqtime.time()
@@ -303,12 +303,12 @@ if __name__ == "__main__":
303
 
304
  app = gr.Blocks()
305
  with app:
306
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Text-to-Music Transformer</h1>")
307
- gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Generate music based on a title of your imagination :)</h1>")
308
  gr.Markdown(
309
- "![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Text-to-Music-Transformer&style=flat)\n\n"
310
  "Generate music based on a title of your imagination :)\n\n"
311
- "Check out [Text-to-Music Transformer](https://github.com/asigalov61/Text-to-Music-Transformer) on GitHub!\n\n"
312
  "[Open In Colab]"
313
  "(https://colab.research.google.com/github/asigalov61/Text-to-Music-Transformer/blob/main/Text_to_Music_Transformer.ipynb)"
314
  " for faster execution and endless generation"
@@ -331,7 +331,7 @@ if __name__ == "__main__":
331
  output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
332
 
333
 
334
- run_event = run_btn.click(Text_to_Music, [input_title, input_num_tokens, input_prompt_type],
335
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
336
 
337
  app.queue().launch()
 
23
  # =================================================================================================
24
 
25
  @spaces.GPU
26
+ def GenerateMusic(input_title, input_num_tokens, input_prompt_type):
27
  print('=' * 70)
28
  print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
29
  start_time = reqtime.time()
 
303
 
304
  app = gr.Blocks()
305
  with app:
306
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Descriptive Music Transformer</h1>")
307
+ gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>A music transformer that describes music it generates</h1>")
308
  gr.Markdown(
309
+ "![Visitors](https://api.visitorbadge.io/api/visitors?path=asigalov61.Descriptive-Music-Transformer&style=flat)\n\n"
310
  "Generate music based on a title of your imagination :)\n\n"
311
+ "Check out [Annotated MIDI Dataset](https://huggingface.co/datasets/asigalov61/Annotated-MIDI-Dataset) on Hugging Face!\n\n"
312
  "[Open In Colab]"
313
  "(https://colab.research.google.com/github/asigalov61/Text-to-Music-Transformer/blob/main/Text_to_Music_Transformer.ipynb)"
314
  " for faster execution and endless generation"
 
331
  output_midi = gr.File(label="Output MIDI file", file_types=[".mid"])
332
 
333
 
334
+ run_event = run_btn.click(GenerateMusic, [input_title, input_num_tokens, input_prompt_type],
335
  [output_midi_title, output_midi_summary, output_midi, output_audio, output_plot])
336
 
337
  app.queue().launch()