adinarayana commited on
Commit
30e1f68
·
verified ·
1 Parent(s): 7a694a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from langchain.llms import OpenAI
2
 
3
  # from dotenv import load_dotenv
@@ -35,14 +36,11 @@ submit = st.button("Generate")
35
  if submit:
36
  st.subheader("The response is")
37
  st.write(response)
 
38
 
39
 
40
 
41
 
42
-
43
-
44
-
45
- """
46
  import os
47
  import re
48
  import pdfminer
@@ -80,7 +78,7 @@ st.header("PDF Summarizer")
80
  # User options
81
  st.subheader("Settings")
82
  summary_length = st.slider("Summary Length", min_value=50, max_value=500, value=100)
83
- summarization_model = st.selectbox("Summarization Model", ["gpt-3.5-turbo-instruct", "t5-small", "t5-large"])
84
 
85
  # File upload and processing
86
  uploaded_file = st.file_uploader("Choose a PDF file")
@@ -99,4 +97,4 @@ if uploaded_file is not None:
99
  st.write(response[0]["summary_text"])
100
  else:
101
  st.error("No text found in the PDF.")
102
- """
 
1
+ """
2
  from langchain.llms import OpenAI
3
 
4
  # from dotenv import load_dotenv
 
36
  if submit:
37
  st.subheader("The response is")
38
  st.write(response)
39
+ """
40
 
41
 
42
 
43
 
 
 
 
 
44
  import os
45
  import re
46
  import pdfminer
 
78
  # User options
79
  st.subheader("Settings")
80
  summary_length = st.slider("Summary Length", min_value=50, max_value=500, value=100)
81
+ summarization_model = st.selectbox("Summarization Model", ["gpt-3.5-turbo-instruct", "t5-small", "facebook/bart-large-cnn"])
82
 
83
  # File upload and processing
84
  uploaded_file = st.file_uploader("Choose a PDF file")
 
97
  st.write(response[0]["summary_text"])
98
  else:
99
  st.error("No text found in the PDF.")
100
+