Spaces:
Runtime error
Runtime error
Steven Zhang
commited on
Commit
•
4005740
1
Parent(s):
0a4f9da
ui update
Browse files- .gitignore +3 -0
- app.py +18 -6
.gitignore
CHANGED
@@ -127,3 +127,6 @@ dmypy.json
|
|
127 |
|
128 |
# Pyre type checker
|
129 |
.pyre/
|
|
|
|
|
|
|
|
127 |
|
128 |
# Pyre type checker
|
129 |
.pyre/
|
130 |
+
|
131 |
+
# my own ckpts from gdown
|
132 |
+
EngToSpanishckpts/
|
app.py
CHANGED
@@ -1,9 +1,21 @@
|
|
1 |
# have to run this locally as streamlit run app.py
|
2 |
import streamlit as st
|
3 |
-
|
|
|
|
|
|
|
|
|
4 |
st.title("Translation model test")
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
st.
|
9 |
-
input_sentence
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
# have to run this locally as streamlit run app.py
|
2 |
import streamlit as st
|
3 |
+
|
4 |
+
from TestTranslation.translation import *
|
5 |
+
|
6 |
+
|
7 |
+
|
8 |
st.title("Translation model test")
|
9 |
+
|
10 |
+
option = st.selectbox("Select input type:", ("text input", "audio input"))
|
11 |
+
if option == "text input":
|
12 |
+
input_sentence = st.text_input("Enter input sentence:")
|
13 |
+
if input_sentence is not None and len(input_sentence) > 0:
|
14 |
+
translated = decode_sequence(input_sentence)
|
15 |
+
st.write(translated)
|
16 |
+
input_sentence = None
|
17 |
+
else:
|
18 |
+
wav_sentence = st.file_uploader("Upload a wav file:")
|
19 |
+
st.button("Submit wav file")
|
20 |
+
|
21 |
+
|