xieli commited on
Commit
d94f450
·
1 Parent(s): f002e54

feat: update duration

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. model_loader.py +0 -2
app.py CHANGED
@@ -114,7 +114,7 @@ def get_gpu_duration(audio_input, text_input, target_text, task_type, task_info)
114
 
115
  if common_tts_engine is None:
116
  # First call - need time for model loading (up to 5 minutes)
117
- return 300 # Maximum allowed duration for model initialization
118
  else:
119
  # Subsequent calls - only inference time needed
120
  return 120 # Standard inference duration
 
114
 
115
  if common_tts_engine is None:
116
  # First call - need time for model loading (up to 5 minutes)
117
+ return 120 # Maximum allowed duration for model initialization
118
  else:
119
  # Subsequent calls - only inference time needed
120
  return 120 # Standard inference duration
model_loader.py CHANGED
@@ -104,7 +104,6 @@ class UnifiedModelLoader:
104
  modelscope_patterns = []
105
  return any(pattern in model_path for pattern in modelscope_patterns)
106
 
107
- @spaces.GPU
108
  def load_transformers_model(
109
  self,
110
  model_path: str,
@@ -189,7 +188,6 @@ class UnifiedModelLoader:
189
  self.logger.error(f"Failed to load model from {source}: {e}")
190
  raise
191
 
192
- @spaces.GPU
193
  def load_funasr_model(
194
  self,
195
  repo_path: str,
 
104
  modelscope_patterns = []
105
  return any(pattern in model_path for pattern in modelscope_patterns)
106
 
 
107
  def load_transformers_model(
108
  self,
109
  model_path: str,
 
188
  self.logger.error(f"Failed to load model from {source}: {e}")
189
  raise
190
 
 
191
  def load_funasr_model(
192
  self,
193
  repo_path: str,