hans00 commited on
Commit
af5a2a8
·
unverified ·
1 Parent(s): ee76bdc

Try fix runtime error

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,13 +6,13 @@ import json
6
  import tempfile
7
  import hashlib
8
  import os
9
- from functools import lru_cache
10
  from typing import Optional
11
  from outetts.models.info import MODEL_INFO
12
  from outetts.utils import helpers
13
  from huggingface_hub import hf_hub_download
14
  import torch
15
  from transformers import BitsAndBytesConfig
 
16
 
17
  # Available OuteTTS models based on the documentation
18
  MODELS = {v.value: v for _, v in outetts.Models.__members__.items()}
@@ -57,6 +57,7 @@ def try_ggml_model(model: outetts.Models, backend: outetts.Backend, quantization
57
  **model_config
58
  )
59
 
 
60
  def get_interface(model_name: str):
61
  """Get interface instance for the model (no caching to avoid CUDA memory issues)."""
62
  model = MODELS[model_name]
 
6
  import tempfile
7
  import hashlib
8
  import os
 
9
  from typing import Optional
10
  from outetts.models.info import MODEL_INFO
11
  from outetts.utils import helpers
12
  from huggingface_hub import hf_hub_download
13
  import torch
14
  from transformers import BitsAndBytesConfig
15
+ import spaces
16
 
17
  # Available OuteTTS models based on the documentation
18
  MODELS = {v.value: v for _, v in outetts.Models.__members__.items()}
 
57
  **model_config
58
  )
59
 
60
+ @spaces.GPU
61
  def get_interface(model_name: str):
62
  """Get interface instance for the model (no caching to avoid CUDA memory issues)."""
63
  model = MODELS[model_name]