bqpxben commited on
Commit
d3b8ec3
1 Parent(s): 1bde6e7

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +21 -0
  2. requirements.txt +9 -0
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+
4
+ generate_summary = pipeline("book-summary-tools", model=" bqpxben/book-summary-tools")
5
+
6
+ def main():
7
+ st.title("Book Summarization App")
8
+
9
+ # Get user input
10
+ user_input = st.text_area("Enter the text you want to summarize:", "")
11
+
12
+ if st.button("Summarize"):
13
+ # Perform summarization
14
+ summary = generate_summary(user_input)
15
+
16
+ # Display result
17
+ st.write("Summary:")
18
+ st.write(summary)
19
+
20
+ if __name__ == "__main__":
21
+ main()
requirements.txt ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ joblib
2
+ pandas
3
+ scikit-learn==1.2.2
4
+ xgboost==1.7.6
5
+ altair<5
6
+ Transformers 4.19.2
7
+ Pytorch 1.11.0+cu113
8
+ Datasets 2.2.2
9
+ Tokenizers 0.12.1