TwentyNine
commited on
Update app.py
Browse files
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
|
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,
|