Zhyw0 commited on
Commit ·
d336ae3
1
Parent(s): dd073be
Add mossttsrealtime model
Browse files
app.py
CHANGED
|
@@ -26,6 +26,20 @@ from mossttsrealtime.streaming_mossttsrealtime import (
|
|
| 26 |
|
| 27 |
torch._dynamo.config.cache_size_limit = 64
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
APP_DIR = Path(__file__).resolve().parent
|
| 30 |
AUDIO_DIR = APP_DIR / "asset"
|
| 31 |
LOG_DIR = APP_DIR / "logs"
|
|
|
|
| 26 |
|
| 27 |
torch._dynamo.config.cache_size_limit = 64
|
| 28 |
|
| 29 |
+
try:
|
| 30 |
+
import spaces
|
| 31 |
+
except ImportError:
|
| 32 |
+
class _SpacesFallback:
|
| 33 |
+
@staticmethod
|
| 34 |
+
def GPU(*_args, **_kwargs):
|
| 35 |
+
def _decorator(func):
|
| 36 |
+
return func
|
| 37 |
+
|
| 38 |
+
return _decorator
|
| 39 |
+
|
| 40 |
+
spaces = _SpacesFallback()
|
| 41 |
+
|
| 42 |
+
|
| 43 |
APP_DIR = Path(__file__).resolve().parent
|
| 44 |
AUDIO_DIR = APP_DIR / "asset"
|
| 45 |
LOG_DIR = APP_DIR / "logs"
|