Spaces:
Runtime error
Runtime error
Commit
·
288a2ec
1
Parent(s):
bb1a5ec
Update app.py
Browse files
app.py
CHANGED
@@ -21,6 +21,7 @@ speaker_embeddings = torch.tensor(embeddings_dataset[7306]["xvector"]).unsqueeze
|
|
21 |
|
22 |
def translate(audio):
|
23 |
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "translate", "language": "it"})
|
|
|
24 |
return outputs["text"]
|
25 |
|
26 |
|
@@ -67,4 +68,4 @@ file_translate = gr.Interface(
|
|
67 |
with demo:
|
68 |
gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
|
69 |
|
70 |
-
demo.launch()
|
|
|
21 |
|
22 |
def translate(audio):
|
23 |
outputs = asr_pipe(audio, max_new_tokens=256, generate_kwargs={"task": "translate", "language": "it"})
|
24 |
+
print(outputs["text"])
|
25 |
return outputs["text"]
|
26 |
|
27 |
|
|
|
68 |
with demo:
|
69 |
gr.TabbedInterface([mic_translate, file_translate], ["Microphone", "Audio File"])
|
70 |
|
71 |
+
demo.launch(share=True)
|