Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +14 -1
src/streamlit_app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
| 2 |
|
| 3 |
st.markdown(
|
| 4 |
"""
|
|
@@ -9,4 +10,16 @@ st.markdown(
|
|
| 9 |
unsafe_allow_html=True
|
| 10 |
)
|
| 11 |
|
| 12 |
-
characters = st.text_input("Enter the characters to begin with")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
import tensorflow as tf
|
| 3 |
|
| 4 |
st.markdown(
|
| 5 |
"""
|
|
|
|
| 10 |
unsafe_allow_html=True
|
| 11 |
)
|
| 12 |
|
| 13 |
+
characters = st.text_input("Enter the characters to begin with")
|
| 14 |
+
|
| 15 |
+
one_step_reloaded = tf.saved_model.load('reonestep20F')
|
| 16 |
+
|
| 17 |
+
states = None
|
| 18 |
+
next_char = tf.constant([characters])
|
| 19 |
+
result = [next_char]
|
| 20 |
+
|
| 21 |
+
for n in range(100):
|
| 22 |
+
next_char, states = one_step_reloaded.generate_one_step(next_char, states=states)
|
| 23 |
+
result.append(next_char)
|
| 24 |
+
|
| 25 |
+
st.write(tf.strings.join(result)[0].numpy().decode("utf-8"))
|