Spaces:
				
			
			
	
			
			
		Sleeping
		
	
	
	
			
			
	
	
	
	
		
		
		Sleeping
		
	Upload app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -3,10 +3,10 @@ | |
| 3 | 
             
            #==================================================================================
         | 
| 4 |  | 
| 5 | 
             
            print('=' * 70)
         | 
| 6 | 
            -
            print('MIDI  | 
| 7 |  | 
| 8 | 
             
            print('=' * 70)
         | 
| 9 | 
            -
            print('Loading core MIDI  | 
| 10 |  | 
| 11 | 
             
            import os
         | 
| 12 | 
             
            import copy
         | 
| @@ -21,7 +21,7 @@ from pytz import timezone | |
| 21 | 
             
            import tqdm
         | 
| 22 |  | 
| 23 | 
             
            print('=' * 70)
         | 
| 24 | 
            -
            print('Loading main MIDI  | 
| 25 |  | 
| 26 | 
             
            import numpy as np
         | 
| 27 |  | 
| @@ -34,7 +34,7 @@ from huggingface_hub import hf_hub_download | |
| 34 | 
             
            import gradio as gr
         | 
| 35 |  | 
| 36 | 
             
            print('=' * 70)
         | 
| 37 | 
            -
            print('Loading aux MIDI  | 
| 38 |  | 
| 39 | 
             
            import matplotlib.pyplot as plt
         | 
| 40 |  | 
| @@ -380,10 +380,10 @@ def Mix_Loops(max_num_loops, | |
| 380 |  | 
| 381 | 
             
                output_score, patches, overflow_patches = TMIDIX.patch_enhanced_score_notes(final_song_abs)
         | 
| 382 |  | 
| 383 | 
            -
                fn1 = "MIDI- | 
| 384 |  | 
| 385 | 
             
                detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
         | 
| 386 | 
            -
                                                                          output_signature = 'MIDI  | 
| 387 | 
             
                                                                          output_file_name = fn1,
         | 
| 388 | 
             
                                                                          track_name='Project Los Angeles',
         | 
| 389 | 
             
                                                                          list_of_MIDI_patches=patches,
         | 
| @@ -445,11 +445,11 @@ with gr.Blocks() as demo: | |
| 445 |  | 
| 446 | 
             
                #==================================================================================
         | 
| 447 |  | 
| 448 | 
            -
                gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI  | 
| 449 | 
            -
                gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'> | 
| 450 | 
             
                gr.HTML("""            
         | 
| 451 | 
             
                        <p> 
         | 
| 452 | 
            -
                            <a href="https://huggingface.co/spaces/asigalov61/MIDI- | 
| 453 | 
             
                                <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-md.svg" alt="Duplicate in Hugging Face">
         | 
| 454 | 
             
                            </a>
         | 
| 455 | 
             
                        </p>
         | 
|  | |
| 3 | 
             
            #==================================================================================
         | 
| 4 |  | 
| 5 | 
             
            print('=' * 70)
         | 
| 6 | 
            +
            print('MIDI Remixer Gradio App')
         | 
| 7 |  | 
| 8 | 
             
            print('=' * 70)
         | 
| 9 | 
            +
            print('Loading core MIDI Remixer modules...')
         | 
| 10 |  | 
| 11 | 
             
            import os
         | 
| 12 | 
             
            import copy
         | 
|  | |
| 21 | 
             
            import tqdm
         | 
| 22 |  | 
| 23 | 
             
            print('=' * 70)
         | 
| 24 | 
            +
            print('Loading main MIDI Remixer modules...')
         | 
| 25 |  | 
| 26 | 
             
            import numpy as np
         | 
| 27 |  | 
|  | |
| 34 | 
             
            import gradio as gr
         | 
| 35 |  | 
| 36 | 
             
            print('=' * 70)
         | 
| 37 | 
            +
            print('Loading aux MIDI Remixer modules...')
         | 
| 38 |  | 
| 39 | 
             
            import matplotlib.pyplot as plt
         | 
| 40 |  | 
|  | |
| 380 |  | 
| 381 | 
             
                output_score, patches, overflow_patches = TMIDIX.patch_enhanced_score_notes(final_song_abs)
         | 
| 382 |  | 
| 383 | 
            +
                fn1 = "MIDI-Remixer-Composition"
         | 
| 384 |  | 
| 385 | 
             
                detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
         | 
| 386 | 
            +
                                                                          output_signature = 'MIDI Remixer',
         | 
| 387 | 
             
                                                                          output_file_name = fn1,
         | 
| 388 | 
             
                                                                          track_name='Project Los Angeles',
         | 
| 389 | 
             
                                                                          list_of_MIDI_patches=patches,
         | 
|  | |
| 445 |  | 
| 446 | 
             
                #==================================================================================
         | 
| 447 |  | 
| 448 | 
            +
                gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>MIDI Remixer</h1>")
         | 
| 449 | 
            +
                gr.Markdown("<h1 style='text-align: center; margin-bottom: 1rem'>Remix repeating parts of any MIDI into one song</h1>")
         | 
| 450 | 
             
                gr.HTML("""            
         | 
| 451 | 
             
                        <p> 
         | 
| 452 | 
            +
                            <a href="https://huggingface.co/spaces/asigalov61/MIDI-Remixer?duplicate=true">
         | 
| 453 | 
             
                                <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-md.svg" alt="Duplicate in Hugging Face">
         | 
| 454 | 
             
                            </a>
         | 
| 455 | 
             
                        </p>
         | 
