Rifky commited on
Commit
71097c4
·
1 Parent(s): a8075a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,7 +42,8 @@ submit = input_column.button("submit")
42
  if submit:
43
  last_time = time.time()
44
  with st.spinner("Reading Article..."):
45
- title, text = Scrap(user_input)
 
46
 
47
  if text:
48
  text = re.sub(r'\n', ' ', text)
@@ -84,4 +85,4 @@ if submit:
84
  <a href={data["url"][i]}><h5>{data["title"][i]}</h5></a>
85
  """, unsafe_allow_html=True)
86
  with reference_column.expander("read content"):
87
- st.write(data["text"][i])
 
42
  if submit:
43
  last_time = time.time()
44
  with st.spinner("Reading Article..."):
45
+ scrap = Scrap(user_input)
46
+ title, text = scrap.title, scrap.text
47
 
48
  if text:
49
  text = re.sub(r'\n', ' ', text)
 
85
  <a href={data["url"][i]}><h5>{data["title"][i]}</h5></a>
86
  """, unsafe_allow_html=True)
87
  with reference_column.expander("read content"):
88
+ st.write(Scrap(data["url"][i]).text)