Spaces:
Sleeping
Sleeping
Commit ·
7246904
1
Parent(s): 53094d2
Bug fix
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ import gradio as gr
|
|
| 14 |
|
| 15 |
model_card = ModelCard(
|
| 16 |
name="Transkun Piano Transcription",
|
| 17 |
-
|
| 18 |
author="Yujia Yan, Zhiyao Duan",
|
| 19 |
tags=["transcription"]
|
| 20 |
)
|
|
@@ -61,7 +61,7 @@ def transcribe(input_file):
|
|
| 61 |
waveform = librosa.resample(waveform.astype(np.float32), orig_sr=sr, target_sr=model.fs)
|
| 62 |
sr = model.fs
|
| 63 |
|
| 64 |
-
x = torch.from_numpy(waveform).to(device)
|
| 65 |
|
| 66 |
notesEst = model.transcribe(x, discardSecondHalf=False)
|
| 67 |
|
|
|
|
| 14 |
|
| 15 |
model_card = ModelCard(
|
| 16 |
name="Transkun Piano Transcription",
|
| 17 |
+
description=("Transcribes solo piano performance into MIDI notation"),
|
| 18 |
author="Yujia Yan, Zhiyao Duan",
|
| 19 |
tags=["transcription"]
|
| 20 |
)
|
|
|
|
| 61 |
waveform = librosa.resample(waveform.astype(np.float32), orig_sr=sr, target_sr=model.fs)
|
| 62 |
sr = model.fs
|
| 63 |
|
| 64 |
+
x = torch.from_numpy(waveform.reshape(-1, 1)).to(device)
|
| 65 |
|
| 66 |
notesEst = model.transcribe(x, discardSecondHalf=False)
|
| 67 |
|