Spaces:
Runtime error
Runtime error
xj
commited on
Commit
β’
2f6d6ff
1
Parent(s):
b6e73ca
[feat] show memory usage
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
# coding=utf-8
|
2 |
import logging
|
3 |
import sys
|
|
|
4 |
logging.getLogger('numba').setLevel(logging.WARNING)
|
5 |
|
6 |
logging.basicConfig(
|
@@ -61,6 +62,8 @@ def vits(text, language, speaker_id, noise_scale, noise_scale_w, length_scale):
|
|
61 |
speaker_id = LongTensor([speaker_id]).to(device)
|
62 |
audio = net_g_ms.infer(x_tst, x_tst_lengths, sid=speaker_id, noise_scale=noise_scale, noise_scale_w=noise_scale_w,
|
63 |
length_scale=length_scale)[0][0, 0].data.cpu().float().numpy()
|
|
|
|
|
64 |
|
65 |
return "ηζζε!", (22050, audio), f"ηζθζΆ {round(time.perf_counter()-start, 2)} s"
|
66 |
|
|
|
1 |
# coding=utf-8
|
2 |
import logging
|
3 |
import sys
|
4 |
+
import os
|
5 |
logging.getLogger('numba').setLevel(logging.WARNING)
|
6 |
|
7 |
logging.basicConfig(
|
|
|
62 |
speaker_id = LongTensor([speaker_id]).to(device)
|
63 |
audio = net_g_ms.infer(x_tst, x_tst_lengths, sid=speaker_id, noise_scale=noise_scale, noise_scale_w=noise_scale_w,
|
64 |
length_scale=length_scale)[0][0, 0].data.cpu().float().numpy()
|
65 |
+
with os.popen('free') as f:
|
66 |
+
logger.info(f.read())
|
67 |
|
68 |
return "ηζζε!", (22050, audio), f"ηζθζΆ {round(time.perf_counter()-start, 2)} s"
|
69 |
|