Upload app.py
Browse files
app.py
CHANGED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
#============================================================================================
|
| 2 |
-
# https://huggingface.co/spaces/projectlosangeles/Orpheus-
|
| 3 |
#============================================================================================
|
| 4 |
|
| 5 |
print('=' * 70)
|
| 6 |
-
print('Orpheus
|
| 7 |
|
| 8 |
print('=' * 70)
|
| 9 |
-
print('Loading core Orpheus
|
| 10 |
|
| 11 |
import os
|
| 12 |
import copy
|
|
@@ -16,7 +16,7 @@ import datetime
|
|
| 16 |
from pytz import timezone
|
| 17 |
|
| 18 |
print('=' * 70)
|
| 19 |
-
print('Loading main Orpheus
|
| 20 |
|
| 21 |
os.environ['USE_FLASH_ATTENTION'] = '1'
|
| 22 |
|
|
@@ -40,7 +40,7 @@ import random
|
|
| 40 |
import tqdm
|
| 41 |
|
| 42 |
print('=' * 70)
|
| 43 |
-
print('Loading aux Orpheus
|
| 44 |
|
| 45 |
import matplotlib.pyplot as plt
|
| 46 |
|
|
@@ -316,10 +316,10 @@ def Generate_Music_Bridge(input_midi,
|
|
| 316 |
|
| 317 |
output_score, patches, overflow_patches = TMIDIX.patch_enhanced_score_notes(song_f)
|
| 318 |
|
| 319 |
-
fn1 = "Orpheus-
|
| 320 |
|
| 321 |
detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
|
| 322 |
-
output_signature = 'Orpheus
|
| 323 |
output_file_name = fn1,
|
| 324 |
track_name='Project Los Angeles',
|
| 325 |
list_of_MIDI_patches=patches
|
|
@@ -376,11 +376,11 @@ with gr.Blocks() as demo:
|
|
| 376 |
|
| 377 |
#==================================================================================
|
| 378 |
|
| 379 |
-
gr.Markdown("<h1 style='text-align: left; margin-bottom: 1rem'>Orpheus
|
| 380 |
gr.Markdown("<h1 style='text-align: left; margin-bottom: 1rem'>Seamless music bridges generation with transformers</h1>")
|
| 381 |
gr.HTML("""
|
| 382 |
<p>
|
| 383 |
-
<a href="https://huggingface.co/spaces/projectlosangeles/Orpheus-
|
| 384 |
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-md.svg" alt="Duplicate in Hugging Face">
|
| 385 |
</a>
|
| 386 |
</p>
|
|
|
|
| 1 |
#============================================================================================
|
| 2 |
+
# https://huggingface.co/spaces/projectlosangeles/Orpheus-Pitches-Inpainter
|
| 3 |
#============================================================================================
|
| 4 |
|
| 5 |
print('=' * 70)
|
| 6 |
+
print('Orpheus Pitches Inpainter Gradio App')
|
| 7 |
|
| 8 |
print('=' * 70)
|
| 9 |
+
print('Loading core Orpheus Pitches Inpainter modules...')
|
| 10 |
|
| 11 |
import os
|
| 12 |
import copy
|
|
|
|
| 16 |
from pytz import timezone
|
| 17 |
|
| 18 |
print('=' * 70)
|
| 19 |
+
print('Loading main Orpheus Pitches Inpainter modules...')
|
| 20 |
|
| 21 |
os.environ['USE_FLASH_ATTENTION'] = '1'
|
| 22 |
|
|
|
|
| 40 |
import tqdm
|
| 41 |
|
| 42 |
print('=' * 70)
|
| 43 |
+
print('Loading aux Orpheus Pitches Inpainter modules...')
|
| 44 |
|
| 45 |
import matplotlib.pyplot as plt
|
| 46 |
|
|
|
|
| 316 |
|
| 317 |
output_score, patches, overflow_patches = TMIDIX.patch_enhanced_score_notes(song_f)
|
| 318 |
|
| 319 |
+
fn1 = "Orpheus-Pitches-Inpainter-Composition"
|
| 320 |
|
| 321 |
detailed_stats = TMIDIX.Tegridy_ms_SONG_to_MIDI_Converter(output_score,
|
| 322 |
+
output_signature = 'Orpheus Pitches Inpainter',
|
| 323 |
output_file_name = fn1,
|
| 324 |
track_name='Project Los Angeles',
|
| 325 |
list_of_MIDI_patches=patches
|
|
|
|
| 376 |
|
| 377 |
#==================================================================================
|
| 378 |
|
| 379 |
+
gr.Markdown("<h1 style='text-align: left; margin-bottom: 1rem'>Orpheus Pitches Inpainter</h1>")
|
| 380 |
gr.Markdown("<h1 style='text-align: left; margin-bottom: 1rem'>Seamless music bridges generation with transformers</h1>")
|
| 381 |
gr.HTML("""
|
| 382 |
<p>
|
| 383 |
+
<a href="https://huggingface.co/spaces/projectlosangeles/Orpheus-Pitches-Inpainter?duplicate=true">
|
| 384 |
<img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-md.svg" alt="Duplicate in Hugging Face">
|
| 385 |
</a>
|
| 386 |
</p>
|