Update analyze.py

#1
by ylacombe HF staff - opened
Files changed (1) hide show
  1. analyze.py +3 -3
analyze.py CHANGED
@@ -2,7 +2,7 @@ from itertools import count, islice
2
  from typing import Any, Iterable, Literal, Optional, TypeVar, Union, overload, Dict, List, Tuple
3
  from collections import defaultdict
4
  import json
5
- import spaces
6
 
7
  import torch
8
 
@@ -37,7 +37,7 @@ def batched(
37
  while batch := list(islice(it, n)):
38
  yield (list(islice(indices, len(batch))), batch) if with_indices else batch
39
 
40
- @spaces.GPU(duration=60)
41
  def analyze(
42
  batch: List[Dict[str, Any]],
43
  audio_column_name: str, text_column_name: str,
@@ -160,4 +160,4 @@ def run_dataspeech(
160
  audio_column_name=audio_column_name,
161
  text_column_name=text_column_name,
162
  cache=cache,
163
- )
 
2
  from typing import Any, Iterable, Literal, Optional, TypeVar, Union, overload, Dict, List, Tuple
3
  from collections import defaultdict
4
  import json
5
+ # import spaces
6
 
7
  import torch
8
 
 
37
  while batch := list(islice(it, n)):
38
  yield (list(islice(indices, len(batch))), batch) if with_indices else batch
39
 
40
+ # @spaces.GPU(duration=60)
41
  def analyze(
42
  batch: List[Dict[str, Any]],
43
  audio_column_name: str, text_column_name: str,
 
160
  audio_column_name=audio_column_name,
161
  text_column_name=text_column_name,
162
  cache=cache,
163
+ )