Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -127,20 +127,23 @@ def main():
|
|
127 |
# URL 입력 받기
|
128 |
if "q" in st.query_params:
|
129 |
value = st.query_params['q']
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
|
|
|
|
|
|
144 |
else:
|
145 |
url = st.text_input("url을 입력하세요")
|
146 |
|
|
|
127 |
# URL 입력 받기
|
128 |
if "q" in st.query_params:
|
129 |
value = st.query_params['q']
|
130 |
+
if value:
|
131 |
+
url = st.text_input("url을 입력하세요",value=st.query_params['q'])
|
132 |
+
title, content, comments = get_comments(url)
|
133 |
+
|
134 |
+
# 결과 표시
|
135 |
+
st.subheader("기사 제목")
|
136 |
+
st.write(title)
|
137 |
+
|
138 |
+
st.subheader("본문 내용")
|
139 |
+
st.write(content)
|
140 |
+
|
141 |
+
st.subheader("댓글")
|
142 |
+
for comment in comments:
|
143 |
+
if evaluation_predict(comment) == 1:
|
144 |
+
st.write(comment)
|
145 |
+
else:
|
146 |
+
url = st.text_input("url을 입력하세요")
|
147 |
else:
|
148 |
url = st.text_input("url을 입력하세요")
|
149 |
|