Commit
·
3bd91d8
1
Parent(s):
d41c1a4
Upload app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ import gradio as gr
|
|
11 |
import numpy as np
|
12 |
import torch
|
13 |
import sentencepiece
|
14 |
-
|
15 |
-
|
16 |
|
17 |
from transformers import pipeline, VitsModel, VitsTokenizer
|
18 |
|
@@ -60,7 +60,7 @@ demo = gr.Blocks()
|
|
60 |
|
61 |
mic_translate = gr.Interface(
|
62 |
fn=speech_to_speech_translation,
|
63 |
-
inputs=gr.Audio(
|
64 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
65 |
title=title,
|
66 |
description=description,
|
@@ -68,9 +68,9 @@ mic_translate = gr.Interface(
|
|
68 |
|
69 |
file_translate = gr.Interface(
|
70 |
fn=speech_to_speech_translation,
|
71 |
-
inputs=gr.Audio(
|
72 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
73 |
-
examples=[["
|
74 |
title=title,
|
75 |
description=description,
|
76 |
)
|
|
|
11 |
import numpy as np
|
12 |
import torch
|
13 |
import sentencepiece
|
14 |
+
|
15 |
+
|
16 |
|
17 |
from transformers import pipeline, VitsModel, VitsTokenizer
|
18 |
|
|
|
60 |
|
61 |
mic_translate = gr.Interface(
|
62 |
fn=speech_to_speech_translation,
|
63 |
+
inputs=gr.Audio(type="filepath"),
|
64 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
65 |
title=title,
|
66 |
description=description,
|
|
|
68 |
|
69 |
file_translate = gr.Interface(
|
70 |
fn=speech_to_speech_translation,
|
71 |
+
inputs=gr.Audio(type="filepath"),
|
72 |
outputs=gr.Audio(label="Generated Speech", type="numpy"),
|
73 |
+
examples=[["/content/drive/MyDrive/test_2.wav"]],
|
74 |
title=title,
|
75 |
description=description,
|
76 |
)
|