Spaces:
Paused
Paused
Edward Tang
commited on
Commit
·
35c90c9
1
Parent(s):
ab26a20
testing
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoProcessor, SeamlessM4TModel
|
3 |
|
4 |
-
st.title("Ed's
|
5 |
|
6 |
processor = AutoProcessor.from_pretrained("facebook/hf-seamless-m4t-large")
|
7 |
|
@@ -19,18 +19,17 @@ def submit():
|
|
19 |
st.write(translated_text_from_text)
|
20 |
|
21 |
|
22 |
-
|
23 |
-
title = st.text_input('hello', "fat cats", on_change=submit)
|
24 |
|
25 |
|
26 |
|
27 |
-
text_inputs = processor(text = title, src_lang="eng", return_tensors="pt")
|
28 |
|
29 |
# from text
|
30 |
-
output_tokens = model.generate(**text_inputs, tgt_lang="fra", generate_speech=False)
|
31 |
-
translated_text_from_text = processor.decode(output_tokens[0].tolist()[0], skip_special_tokens=True)
|
32 |
|
33 |
-
st.write(translated_text_from_text)
|
34 |
st.write("fool me")
|
35 |
|
36 |
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import AutoProcessor, SeamlessM4TModel
|
3 |
|
4 |
+
st.title("Ed's working Hot Dog? Or Not!!!!!?")
|
5 |
|
6 |
processor = AutoProcessor.from_pretrained("facebook/hf-seamless-m4t-large")
|
7 |
|
|
|
19 |
st.write(translated_text_from_text)
|
20 |
|
21 |
|
22 |
+
st.text_input('hello', "fat cats", on_change=submit)
|
|
|
23 |
|
24 |
|
25 |
|
26 |
+
#text_inputs = processor(text = title, src_lang="eng", return_tensors="pt")
|
27 |
|
28 |
# from text
|
29 |
+
#output_tokens = model.generate(**text_inputs, tgt_lang="fra", generate_speech=False)
|
30 |
+
#translated_text_from_text = processor.decode(output_tokens[0].tolist()[0], skip_special_tokens=True)
|
31 |
|
32 |
+
#st.write(translated_text_from_text)
|
33 |
st.write("fool me")
|
34 |
|
35 |
|