changed ui, added streamlit
Browse files
app.py
CHANGED
|
@@ -51,7 +51,7 @@ def get_paragraphs(soup):
|
|
| 51 |
|
| 52 |
def get_hindex(headlines):
|
| 53 |
global url
|
| 54 |
-
sbox = st.selectbox(f"Pick a headline here from NPR and get a summary below",
|
| 55 |
options=headlines)
|
| 56 |
hindex = headlines.index(sbox)
|
| 57 |
paras, pstart = get_story(hindex)
|
|
@@ -157,7 +157,7 @@ if True:
|
|
| 157 |
summary = summarize_chunks(chunks)
|
| 158 |
chunks = chunkify(paras, pstart)
|
| 159 |
if device == -1:
|
| 160 |
-
st.write("
|
| 161 |
summary = summarize_chunks(chunks)
|
| 162 |
with st.container(border=True):
|
| 163 |
st.subheader("Summary")
|
|
|
|
| 51 |
|
| 52 |
def get_hindex(headlines):
|
| 53 |
global url
|
| 54 |
+
sbox = st.selectbox(f"\n\n Pick a headline here from NPR and get a summary below",
|
| 55 |
options=headlines)
|
| 56 |
hindex = headlines.index(sbox)
|
| 57 |
paras, pstart = get_story(hindex)
|
|
|
|
| 157 |
summary = summarize_chunks(chunks)
|
| 158 |
chunks = chunkify(paras, pstart)
|
| 159 |
if device == -1:
|
| 160 |
+
st.write("\nbe patient, ino GPU, this might take some time on the CPU\n")
|
| 161 |
summary = summarize_chunks(chunks)
|
| 162 |
with st.container(border=True):
|
| 163 |
st.subheader("Summary")
|