duwing commited on
Commit
6e1bdf8
ยท
verified ยท
1 Parent(s): d79e81e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -16
app.py CHANGED
@@ -130,6 +130,23 @@ def main():
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("๊ธฐ์‚ฌ ์ œ๋ชฉ")
@@ -142,27 +159,42 @@ def main():
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
-
150
 
151
- if st.button("์Šคํฌ๋žฉ ์‹œ์ž‘"):
152
- if url:
153
- title, content, comments = get_comments(url)
154
-
155
- # ๊ฒฐ๊ณผ ํ‘œ์‹œ
156
- st.subheader("๊ธฐ์‚ฌ ์ œ๋ชฉ")
157
- st.write(title)
158
-
159
- st.subheader("๋ณธ๋ฌธ ๋‚ด์šฉ")
160
- st.write(content)
161
-
162
- st.subheader("๋Œ“๊ธ€")
163
- for comment in comments:
164
- if evaluation_predict(comment) == 1:
165
- st.write(comment)
166
  return 0
167
 
168
  if __name__ == "__main__":
 
130
  if value:
131
  url = st.text_input("url์„ ์ž…๋ ฅํ•˜์„ธ์š”",value=st.query_params['q'])
132
  title, content, comments = get_comments(url)
133
+
134
+ if st.button("์Šคํฌ๋žฉ ์‹œ์ž‘"):
135
+ if url:
136
+ title, content, comments = get_comments(url)
137
+
138
+ # ๊ฒฐ๊ณผ ํ‘œ์‹œ
139
+ st.subheader("๊ธฐ์‚ฌ ์ œ๋ชฉ")
140
+ st.write(title)
141
+
142
+ st.subheader("๋ณธ๋ฌธ ๋‚ด์šฉ")
143
+ st.write(content)
144
+
145
+ st.subheader("๋Œ“๊ธ€")
146
+ for comment in comments:
147
+ if evaluation_predict(comment) == 1:
148
+ st.write(comment)
149
+
150
 
151
  # ๊ฒฐ๊ณผ ํ‘œ์‹œ
152
  st.subheader("๊ธฐ์‚ฌ ์ œ๋ชฉ")
 
159
  for comment in comments:
160
  if evaluation_predict(comment) == 1:
161
  st.write(comment)
162
+
163
  else:
164
  url = st.text_input("url์„ ์ž…๋ ฅํ•˜์„ธ์š”")
165
+ if st.button("์Šคํฌ๋žฉ ์‹œ์ž‘"):
166
+ if url:
167
+ title, content, comments = get_comments(url)
168
+
169
+ # ๊ฒฐ๊ณผ ํ‘œ์‹œ
170
+ st.subheader("๊ธฐ์‚ฌ ์ œ๋ชฉ")
171
+ st.write(title)
172
+
173
+ st.subheader("๋ณธ๋ฌธ ๋‚ด์šฉ")
174
+ st.write(content)
175
+
176
+ st.subheader("๋Œ“๊ธ€")
177
+ for comment in comments:
178
+ if evaluation_predict(comment) == 1:
179
+ st.write(comment)
180
  else:
181
  url = st.text_input("url์„ ์ž…๋ ฅํ•˜์„ธ์š”")
 
182
 
183
+ if st.button("์Šคํฌ๋žฉ ์‹œ์ž‘"):
184
+ if url:
185
+ title, content, comments = get_comments(url)
186
+
187
+ # ๊ฒฐ๊ณผ ํ‘œ์‹œ
188
+ st.subheader("๊ธฐ์‚ฌ ์ œ๋ชฉ")
189
+ st.write(title)
190
+
191
+ st.subheader("๋ณธ๋ฌธ ๋‚ด์šฉ")
192
+ st.write(content)
193
+
194
+ st.subheader("๋Œ“๊ธ€")
195
+ for comment in comments:
196
+ if evaluation_predict(comment) == 1:
197
+ st.write(comment)
198
  return 0
199
 
200
  if __name__ == "__main__":