TwentyNine commited on
Commit
811019f
·
verified ·
1 Parent(s): 60a7c28

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,13 +10,13 @@ def transcribe(input_str):
10
  for input in input_str.split('\n'):
11
  input_enc = tokenizer.encode(input_str.strip(), return_tensors='pt')
12
  output_enc = model.generate(input_enc, max_length=256)
13
-
14
  if len(output_str) > 0:
15
  output_str = output_str + '\n'
16
-
17
  output_str = output_str + tokenizer.decode(output_enc[0], skip_special_tokens=True)
18
 
19
- return tokenizer.decode(output_enc[0], skip_special_tokens=True)
20
 
21
  gradio_app = gr.Interface(
22
  transcribe,
 
10
  for input in input_str.split('\n'):
11
  input_enc = tokenizer.encode(input_str.strip(), return_tensors='pt')
12
  output_enc = model.generate(input_enc, max_length=256)
13
+
14
  if len(output_str) > 0:
15
  output_str = output_str + '\n'
16
+
17
  output_str = output_str + tokenizer.decode(output_enc[0], skip_special_tokens=True)
18
 
19
+ return output_str
20
 
21
  gradio_app = gr.Interface(
22
  transcribe,