Spaces:
Running
Running
# Copyright (c) Meta Platforms, Inc. and affiliates. | |
# All rights reserved. | |
# This source code is licensed under the license found in the | |
# LICENSE file in the root directory of this source tree. | |
# Updated to account for UI changes from https://github.com/rkfg/audiocraft/blob/long/app.py | |
# also released under the MIT license. | |
import argparse | |
from concurrent.futures import ProcessPoolExecutor | |
import os | |
from pathlib import Path | |
import subprocess as sp | |
from tempfile import NamedTemporaryFile | |
import time | |
import warnings | |
import glob | |
import re | |
from PIL import Image | |
from pydub import AudioSegment | |
from datetime import datetime | |
import json | |
import shutil | |
import taglib | |
import torch | |
import torchaudio | |
import gradio as gr | |
import numpy as np | |
import typing as tp | |
from audiocraft.data.audio_utils import convert_audio | |
from audiocraft.data.audio import audio_write | |
from audiocraft.models import AudioGen, MusicGen, MultiBandDiffusion | |
from audiocraft.utils import ui | |
import random, string | |
version = "2.0.0a" | |
theme = gr.themes.Glass( | |
primary_hue="stone", | |
secondary_hue="teal", | |
neutral_hue="stone", |