Spaces:
Runtime error
Runtime error
Fabrice-TIERCELIN
commited on
Add new import
Browse files
app.py
CHANGED
@@ -1,9 +1,27 @@
|
|
1 |
-
import
|
|
|
2 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
import torch.nn.functional as F
|
4 |
from torchvision.transforms.functional import normalize
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
-
import gradio as gr
|
7 |
from gradio_imageslider import ImageSlider
|
8 |
from briarmbg import BriaRMBG
|
9 |
import PIL
|
|
|
1 |
+
import gradio as gr
|
2 |
+
import json
|
3 |
import torch
|
4 |
+
import time
|
5 |
+
import random
|
6 |
+
try:
|
7 |
+
# Only on HuggingFace
|
8 |
+
import spaces
|
9 |
+
is_space_imported = True
|
10 |
+
except ImportError:
|
11 |
+
is_space_imported = False
|
12 |
+
|
13 |
+
from tqdm import tqdm
|
14 |
+
from huggingface_hub import snapshot_download
|
15 |
+
from models import AudioDiffusion, DDPMScheduler
|
16 |
+
from audioldm.audio.stft import TacotronSTFT
|
17 |
+
from audioldm.variational_autoencoder import AutoencoderKL
|
18 |
+
from pydub import AudioSegment
|
19 |
+
|
20 |
+
# Old code
|
21 |
+
import numpy as np
|
22 |
import torch.nn.functional as F
|
23 |
from torchvision.transforms.functional import normalize
|
24 |
from huggingface_hub import hf_hub_download
|
|
|
25 |
from gradio_imageslider import ImageSlider
|
26 |
from briarmbg import BriaRMBG
|
27 |
import PIL
|