Spaces:
Runtime error
Runtime error
updates
Browse files
src/visualization/visualize.py
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from src.models.predict_model import predict_model
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
def visualize():
|
| 6 |
+
st.write('# Summarization UI')
|
| 7 |
+
st.markdown(
|
| 8 |
+
'''
|
| 9 |
+
*For additional questions and inquiries, please contact **Gagan Bhatia** via [LinkedIn](
|
| 10 |
+
https://www.linkedin.com/in/gbhatia30/) or [Github](https://github.com/gagan3012).*
|
| 11 |
+
''')
|
| 12 |
+
|
| 13 |
+
text = st.text_area("Enter text here")
|
| 14 |
+
if st.button("Generate Summary"):
|
| 15 |
+
with st.spinner("Connecting the Dots..."):
|
| 16 |
+
text = predict_model(text=text)
|
| 17 |
+
st.write("# Generated Summary:")
|
| 18 |
+
st.write("{}".format(text))
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
if __name__ == "__main__":
|
| 22 |
+
visualize()
|