Spaces:
Running
on
Zero
Running
on
Zero
chong.zhang
commited on
Commit
·
b5adbf2
1
Parent(s):
d2381e4
update
Browse files
app.py
CHANGED
@@ -1,3 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import os
|
2 |
# import spaces
|
3 |
import gradio as gr
|
@@ -7,10 +21,16 @@ import datetime
|
|
7 |
import hashlib
|
8 |
import torch
|
9 |
import subprocess
|
|
|
|
|
10 |
|
11 |
os.system('nvidia-smi')
|
|
|
12 |
print(torch.backends.cudnn.version())
|
13 |
|
|
|
|
|
|
|
14 |
def generate_filename():
|
15 |
hash_object = hashlib.sha256(str(int(datetime.datetime.now().timestamp())).encode())
|
16 |
hash_string = hash_object.hexdigest()
|
|
|
1 |
+
# Copyright (c) 2024 Alibaba Inc (authors: Chong Zhang)
|
2 |
+
#
|
3 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
+
# you may not use this file except in compliance with the License.
|
5 |
+
# You may obtain a copy of the License at
|
6 |
+
#
|
7 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
+
#
|
9 |
+
# Unless required by applicable law or agreed to in writing, software
|
10 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
+
# See the License for the specific language governing permissions and
|
13 |
+
# limitations under the License.
|
14 |
+
|
15 |
import os
|
16 |
# import spaces
|
17 |
import gradio as gr
|
|
|
21 |
import hashlib
|
22 |
import torch
|
23 |
import subprocess
|
24 |
+
import importlib
|
25 |
+
import sys
|
26 |
|
27 |
os.system('nvidia-smi')
|
28 |
+
os.system('apt update -y && apt-get install -y apt-utils && apt install -y unzip')
|
29 |
print(torch.backends.cudnn.version())
|
30 |
|
31 |
+
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
|
32 |
+
sys.path.append('{}/third_party/Matcha-TTS'.format(ROOT_DIR))
|
33 |
+
|
34 |
def generate_filename():
|
35 |
hash_object = hashlib.sha256(str(int(datetime.datetime.now().timestamp())).encode())
|
36 |
hash_string = hash_object.hexdigest()
|