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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -14
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
- url = st.text_input("url์„ ์ž…๋ ฅํ•˜์„ธ์š”",value=st.query_params['q'])
131
- title, content, comments = get_comments(url)
132
-
133
- # ๊ฒฐ๊ณผ ํ‘œ์‹œ
134
- st.subheader("๊ธฐ์‚ฌ ์ œ๋ชฉ")
135
- st.write(title)
136
-
137
- st.subheader("๋ณธ๋ฌธ ๋‚ด์šฉ")
138
- st.write(content)
139
-
140
- st.subheader("๋Œ“๊ธ€")
141
- for comment in comments:
142
- if evaluation_predict(comment) == 1:
143
- st.write(comment)
 
 
 
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