Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,6 @@ import torch
|
|
9 |
import spaces
|
10 |
import gradio as gr
|
11 |
|
12 |
-
from x_transformer_1_23_2 import *
|
13 |
import random
|
14 |
import tqdm
|
15 |
|
@@ -18,12 +17,16 @@ import TMIDIX
|
|
18 |
|
19 |
import matplotlib.pyplot as plt
|
20 |
|
|
|
|
|
|
|
|
|
21 |
in_space = os.getenv("SYSTEM") == "spaces"
|
22 |
|
23 |
# =================================================================================================
|
24 |
|
25 |
@spaces.GPU
|
26 |
-
def
|
27 |
print('=' * 70)
|
28 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
29 |
start_time = reqtime.time()
|
|
|
9 |
import spaces
|
10 |
import gradio as gr
|
11 |
|
|
|
12 |
import random
|
13 |
import tqdm
|
14 |
|
|
|
17 |
|
18 |
import matplotlib.pyplot as plt
|
19 |
|
20 |
+
from inference import PianoTranscription
|
21 |
+
from config import sample_rate
|
22 |
+
from utilities import load_audio
|
23 |
+
|
24 |
in_space = os.getenv("SYSTEM") == "spaces"
|
25 |
|
26 |
# =================================================================================================
|
27 |
|
28 |
@spaces.GPU
|
29 |
+
def TranscribePianoAudio(input_audio):
|
30 |
print('=' * 70)
|
31 |
print('Req start time: {:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now(PDT)))
|
32 |
start_time = reqtime.time()
|