Update app.py
Browse files
app.py
CHANGED
@@ -2,6 +2,33 @@ import gradio as gr
|
|
2 |
import torch
|
3 |
from diffusers import AudioLDM2Pipeline
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
# make Space compatible with CPU duplicates
|
7 |
if torch.cuda.is_available():
|
|
|
2 |
import torch
|
3 |
from diffusers import AudioLDM2Pipeline
|
4 |
|
5 |
+
import ast
|
6 |
+
import copy
|
7 |
+
import csv
|
8 |
+
import inspect
|
9 |
+
import os
|
10 |
+
import shutil
|
11 |
+
import subprocess
|
12 |
+
import tempfile
|
13 |
+
import warnings
|
14 |
+
from functools import partial
|
15 |
+
from pathlib import Path
|
16 |
+
from typing import TYPE_CHECKING, Any, Callable, Iterable, Literal, Optional, Sequence
|
17 |
+
|
18 |
+
import numpy as np
|
19 |
+
import PIL
|
20 |
+
import PIL.Image
|
21 |
+
from gradio_client import utils as client_utils
|
22 |
+
from gradio_client.documentation import document
|
23 |
+
|
24 |
+
from gradio import components, oauth, processing_utils, routes, utils, wasm_utils
|
25 |
+
from gradio.context import Context, LocalContext, get_blocks_context
|
26 |
+
from gradio.data_classes import GradioModel, GradioRootModel
|
27 |
+
from gradio.events import Dependency, EventData
|
28 |
+
from gradio.exceptions import Error
|
29 |
+
from gradio.flagging import CSVLogger
|
30 |
+
from gradio.utils import UnhashableKeyDict
|
31 |
+
|
32 |
|
33 |
# make Space compatible with CPU duplicates
|
34 |
if torch.cuda.is_available():
|