j-tobias commited on
Commit
4d45f42
·
1 Parent(s): a8a920e

small bug fix

Browse files
Files changed (1) hide show
  1. app.py +13 -10
app.py CHANGED
@@ -10,14 +10,14 @@ import os
10
 
11
  from huggingface_hub import InferenceClient
12
 
13
- # hf_token = os.getenv("HF_Token")
14
 
15
- def get_token():
16
- with open("credentials.json","r") as f:
17
- credentials = json.load(f)
18
- return credentials['token']
19
 
20
- hf_token = get_token()
21
 
22
 
23
  words_to_guess = [
@@ -106,10 +106,6 @@ def transcribe_whisper_tiny_en(audio):
106
  transcription = processor.tokenizer.normalize(transcription[0])
107
  return transcription
108
 
109
-
110
-
111
-
112
-
113
  def load_model(asr_model_choice:str):
114
  global processor
115
  global model
@@ -127,6 +123,13 @@ def load_model(asr_model_choice:str):
127
 
128
  print("Model Loaded: ",model_flag)
129
 
 
 
 
 
 
 
 
130
  with gr.Blocks() as app:
131
 
132
  gr.Markdown("# VoiceBot Game 🕹️")
 
10
 
11
  from huggingface_hub import InferenceClient
12
 
13
+ hf_token = os.getenv("HF_Token")
14
 
15
+ # def get_token():
16
+ # with open("credentials.json","r") as f:
17
+ # credentials = json.load(f)
18
+ # return credentials['token']
19
 
20
+ # hf_token = get_token()
21
 
22
 
23
  words_to_guess = [
 
106
  transcription = processor.tokenizer.normalize(transcription[0])
107
  return transcription
108
 
 
 
 
 
109
  def load_model(asr_model_choice:str):
110
  global processor
111
  global model
 
123
 
124
  print("Model Loaded: ",model_flag)
125
 
126
+
127
+
128
+
129
+
130
+
131
+
132
+ # The App
133
  with gr.Blocks() as app:
134
 
135
  gr.Markdown("# VoiceBot Game 🕹️")