add file upload option
Browse files
app.py
CHANGED
@@ -31,6 +31,11 @@ if __name__ == "__main__":
|
|
31 |
|
32 |
inp_text = st.text_input("Enter text or a url here")
|
33 |
|
|
|
|
|
|
|
|
|
|
|
34 |
is_url = validators.url(inp_text)
|
35 |
if is_url:
|
36 |
# complete text, chunks to summarize (list of sentences for long docs)
|
|
|
31 |
|
32 |
inp_text = st.text_input("Enter text or a url here")
|
33 |
|
34 |
+
st.subheader("----- OR -----")
|
35 |
+
uploaded_file = st.file_uploader(
|
36 |
+
"Upload a .txt, .pdf, .word file for summarization"
|
37 |
+
)
|
38 |
+
|
39 |
is_url = validators.url(inp_text)
|
40 |
if is_url:
|
41 |
# complete text, chunks to summarize (list of sentences for long docs)
|