duwing commited on
Commit
6ad7f19
·
verified ·
1 Parent(s): 818643e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -127,6 +127,24 @@ def main():
127
  url = st.text_input("url을 입력하세요",value=st.query_params['q'])
128
  else:
129
  url = st.text_input("url을 입력하세요")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
130
  if st.button("스크랩 시작"):
131
  if url:
132
  title, content, comments = get_comments(url)
 
127
  url = st.text_input("url을 입력하세요",value=st.query_params['q'])
128
  else:
129
  url = st.text_input("url을 입력하세요")
130
+
131
+ if url:
132
+ title, content, comments = get_comments(url)
133
+
134
+
135
+ # 결과 표시
136
+ st.subheader("기사 제목")
137
+ st.write(title)
138
+
139
+ st.subheader("본문 내용")
140
+ st.write(content)
141
+
142
+ st.subheader("댓글")
143
+ for comment in comments:
144
+ if evaluation_predict(comment) == 1:
145
+ st.write(comment)
146
+
147
+
148
  if st.button("스크랩 시작"):
149
  if url:
150
  title, content, comments = get_comments(url)