gagan3012 commited on
Commit
34fb159
·
1 Parent(s): b260988

Fix for hf spaces

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. app.py +23 -0
  3. src/visualization/visualize.py +1 -1
README.md CHANGED
@@ -4,7 +4,7 @@ emoji: 💯
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: streamlit
7
- app_file: src/visualization/visualize.py
8
  pinned: false
9
  ---
10
 
 
4
  colorFrom: yellow
5
  colorTo: red
6
  sdk: streamlit
7
+ app_file: app.py
8
  pinned: false
9
  ---
10
 
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
14
+ text = st.text_area("Enter text here")
15
+ if st.button("Generate Summary"):
16
+ with st.spinner("Connecting the Dots..."):
17
+ sumtext = predict_model(text=text)
18
+ st.write("# Generated Summary:")
19
+ st.write("{}".format(sumtext))
20
+
21
+
22
+ if __name__ == "__main__":
23
+ visualize()
src/visualization/visualize.py CHANGED
@@ -1,5 +1,5 @@
1
  import streamlit as st
2
- from ..models.predict_model import predict_model
3
 
4
 
5
  def visualize():
 
1
  import streamlit as st
2
+ from src.models.predict_model import predict_model
3
 
4
 
5
  def visualize():