From fcdd1d30af11da333d8cf57e7b8cda78b159578f Mon Sep 17 00:00:00 2001 From: Rumah <93970226+Sewlell@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:53:38 +0800 Subject: [PATCH] Update gradio_app.py --- gradio_app.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gradio_app.py b/gradio_app.py index 11203fe..9183e66 100644 --- a/gradio_app.py +++ b/gradio_app.py @@ -1,6 +1,8 @@ import os -# os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" -# os.environ["CUDA_VISIBLE_DEVICES"] = "0" # for local use + os.chdir("/content/VoiceCraft-gradio-colab") + os.environ['USER'] = 'aaa' + os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" + os.environ["CUDA_VISIBLE_DEVICES"] = "0" # for local use import gradio as gr import torch import torchaudio @@ -14,9 +16,6 @@ import numpy as np import random import uuid -os.chdir("/content/VoiceCraft-gradio-colab") -os.environ['USER'] = 'aaa' - TMP_PATH = os.getenv("TMP_PATH", "./demo/temp") device = "cuda" if torch.cuda.is_available() else "cpu" whisper_model, align_model, voicecraft_model = None, None, None