Pengwei Li
commited on
Commit
·
5fc031d
1
Parent(s):
26eb385
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
import os
|
2 |
-
os.system("pip install gradio==
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
|
|
5 |
|
6 |
title = "Fairseq S2S"
|
7 |
|
@@ -13,7 +14,7 @@ examples = [
|
|
13 |
["enhanced_direct_s2st_units_audios_es-en_set2_source_12478_cv.flac","xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022"],
|
14 |
]
|
15 |
|
16 |
-
io1 = gr.Interface.load("huggingface/facebook/xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022")
|
17 |
|
18 |
def inference(text,model):
|
19 |
outtext = io1(text)
|
|
|
1 |
import os
|
2 |
+
os.system("pip install gradio==3.3")
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
+
import streamlit as st
|
6 |
|
7 |
title = "Fairseq S2S"
|
8 |
|
|
|
14 |
["enhanced_direct_s2st_units_audios_es-en_set2_source_12478_cv.flac","xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022"],
|
15 |
]
|
16 |
|
17 |
+
io1 = gr.Interface.load("huggingface/facebook/xm_transformer_s2ut_800m-es-en-st-asr-bt_h1_2022", api_key=st.secrets["api_key"])
|
18 |
|
19 |
def inference(text,model):
|
20 |
outtext = io1(text)
|