Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from audio2midi.melodia_pitch_detector import Melodia
|
|
6 |
from audio2midi.pop2piano import Pop2Piano
|
7 |
from audio2midi.violin_pitch_detector import Violin_Pitch_Det
|
8 |
# from audio2midi.mt3_music_transcription import MT3
|
9 |
-
from audio2midi.yourmt3_music_transcription import YMT3
|
10 |
|
11 |
from audio2midi.magenta_music_transcription import Magenta
|
12 |
from os import environ
|
@@ -68,9 +68,9 @@ gr.TabbedInterface([
|
|
68 |
gr.Interface(Crepe(getenv("crepe_model_capacity","full")).predict,[gr.Audio(type="filepath",label="Input Audio"),gr.Checkbox(False,label="viterbi",info="Apply viterbi smoothing to the estimated pitch curve"),gr.Checkbox(True,label="center"),gr.Number(10,label="step size",info="The step size in milliseconds for running pitch estimation."),gr.Number(0.8,label="minimum confidence"),gr.Number(32,label="batch size")],gr.File(label="Midi File")),
|
69 |
gr.Interface(CrepeTF(getenv("crepe_model_capacity","full")).predict,[gr.Audio(type="filepath",label="Input Audio"),gr.Checkbox(False,label="viterbi",info="Apply viterbi smoothing to the estimated pitch curve"),gr.Checkbox(True,label="center"),gr.Number(10,label="step size",info="The step size in milliseconds for running pitch estimation."),gr.Number(0.8,label="minimum confidence"),gr.Number(32,label="batch size")],gr.File(label="Midi File")),
|
70 |
gr.Interface(Pop2Piano(device).predict,[gr.Audio(label="Input Audio",type="filepath"),gr.Number(1, minimum=1, maximum=21, label="Composer"),gr.Number(2,label="Details in Piano"),gr.Number(1,label="Efficiency of Piano"),gr.Radio([1,2,4],label="steps per beat",value=2)],gr.File(label="MIDI File")),
|
71 |
-
gr.Interface(YMT3(hf_hub_download("shethjenil/Audio2Midi_Models",f'{getenv("crepe_model_capacity","YMT3+")}.pt'),getenv("crepe_model_capacity","YMT3+"),"32" if str(device) == "cpu" else "16",device).predict,gr.gr.Audio(label="Input Audio",type="filepath"),gr.File(label="MIDI File")),
|
72 |
# gr.Interface(MT3(str(Path("mt3_model").absolute())).predict,[gr.Audio(label="Input Audio",type="filepath"),gr.Number(0,label="seed")],gr.File(label="MIDI File")),
|
73 |
midi_viz_ui
|
74 |
-
],["Normal Pitch Detection","Guitar Based Pitch Detection","Melodia","Spotify Pitch Detection","Magenta Pitch Detection","Violin Based Pitch Detection","Crepe Pitch Detection","Crepe Pitch Detection TF","Pop2Piano",
|
75 |
-
# "MT3",
|
76 |
"Midi Vizulizer"]).launch()
|
|
|
6 |
from audio2midi.pop2piano import Pop2Piano
|
7 |
from audio2midi.violin_pitch_detector import Violin_Pitch_Det
|
8 |
# from audio2midi.mt3_music_transcription import MT3
|
9 |
+
# from audio2midi.yourmt3_music_transcription import YMT3
|
10 |
|
11 |
from audio2midi.magenta_music_transcription import Magenta
|
12 |
from os import environ
|
|
|
68 |
gr.Interface(Crepe(getenv("crepe_model_capacity","full")).predict,[gr.Audio(type="filepath",label="Input Audio"),gr.Checkbox(False,label="viterbi",info="Apply viterbi smoothing to the estimated pitch curve"),gr.Checkbox(True,label="center"),gr.Number(10,label="step size",info="The step size in milliseconds for running pitch estimation."),gr.Number(0.8,label="minimum confidence"),gr.Number(32,label="batch size")],gr.File(label="Midi File")),
|
69 |
gr.Interface(CrepeTF(getenv("crepe_model_capacity","full")).predict,[gr.Audio(type="filepath",label="Input Audio"),gr.Checkbox(False,label="viterbi",info="Apply viterbi smoothing to the estimated pitch curve"),gr.Checkbox(True,label="center"),gr.Number(10,label="step size",info="The step size in milliseconds for running pitch estimation."),gr.Number(0.8,label="minimum confidence"),gr.Number(32,label="batch size")],gr.File(label="Midi File")),
|
70 |
gr.Interface(Pop2Piano(device).predict,[gr.Audio(label="Input Audio",type="filepath"),gr.Number(1, minimum=1, maximum=21, label="Composer"),gr.Number(2,label="Details in Piano"),gr.Number(1,label="Efficiency of Piano"),gr.Radio([1,2,4],label="steps per beat",value=2)],gr.File(label="MIDI File")),
|
71 |
+
# gr.Interface(YMT3(hf_hub_download("shethjenil/Audio2Midi_Models",f'{getenv("crepe_model_capacity","YMT3+")}.pt'),getenv("crepe_model_capacity","YMT3+"),"32" if str(device) == "cpu" else "16",device).predict,gr.gr.Audio(label="Input Audio",type="filepath"),gr.File(label="MIDI File")),
|
72 |
# gr.Interface(MT3(str(Path("mt3_model").absolute())).predict,[gr.Audio(label="Input Audio",type="filepath"),gr.Number(0,label="seed")],gr.File(label="MIDI File")),
|
73 |
midi_viz_ui
|
74 |
+
],["Normal Pitch Detection","Guitar Based Pitch Detection","Melodia","Spotify Pitch Detection","Magenta Pitch Detection","Violin Based Pitch Detection","Crepe Pitch Detection","Crepe Pitch Detection TF","Pop2Piano",
|
75 |
+
# "YourMT3","MT3",
|
76 |
"Midi Vizulizer"]).launch()
|