Scrya commited on
Commit
8f3689f
1 Parent(s): ecbc9c8

add counter

Browse files
Files changed (1) hide show
  1. predict.py +5 -0
predict.py CHANGED
@@ -9,6 +9,8 @@ from typing import Any, List, Dict, Tuple
9
  from utils import meow_stretch, get_word_lengths
10
  from config import config, BaseConfig
11
 
 
 
12
  ''' Gradio Input/Output Configurations '''
13
  inputs: str = 'text'
14
  outputs: gr.Audio = gr.Audio()
@@ -39,6 +41,9 @@ meows, weights = extract_meows_weights(meow_items)
39
 
40
  def predict(text: str) -> str:
41
 
 
 
 
42
  word_lengths = get_word_lengths(text)
43
  selected_meows = random.choices(meows, weights=weights, k=len(word_lengths))
44
  transformed_meows = [
 
9
  from utils import meow_stretch, get_word_lengths
10
  from config import config, BaseConfig
11
 
12
+ COUNTER = 0
13
+
14
  ''' Gradio Input/Output Configurations '''
15
  inputs: str = 'text'
16
  outputs: gr.Audio = gr.Audio()
 
41
 
42
  def predict(text: str) -> str:
43
 
44
+ COUNTER += 1
45
+ print(f'Number of calls:', COUNTER)
46
+
47
  word_lengths = get_word_lengths(text)
48
  selected_meows = random.choices(meows, weights=weights, k=len(word_lengths))
49
  transformed_meows = [