duwing commited on
Commit
4d557b7
ยท
verified ยท
1 Parent(s): fce00d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -10,7 +10,6 @@ import requests
10
  from bs4 import BeautifulSoup
11
  import time
12
 
13
- st.query_params['q'] = ''
14
  PATH_t = './checkpoint-7500/'
15
  PATH = './checkpoint-18750/'
16
  SEQ_LEN = 128
@@ -123,12 +122,13 @@ def main():
123
  st.title("๋Œ“๊ธ€ ํ•„ํ„ฐ๋ง ์„œ๋น„์Šค")
124
 
125
  # URL ์ž…๋ ฅ ๋ฐ›๊ธฐ
126
-
127
- url = st.text_input("url์„ ์ž…๋ ฅํ•˜์„ธ์š”")
128
- url = st.query_params['q']
 
 
129
  if st.button("์Šคํฌ๋žฉ ์‹œ์ž‘"):
130
  if url:
131
- st.query_params['q'] = url
132
  title, content, comments = get_comments(url)
133
 
134
  # ๊ฒฐ๊ณผ ํ‘œ์‹œ
 
10
  from bs4 import BeautifulSoup
11
  import time
12
 
 
13
  PATH_t = './checkpoint-7500/'
14
  PATH = './checkpoint-18750/'
15
  SEQ_LEN = 128
 
122
  st.title("๋Œ“๊ธ€ ํ•„ํ„ฐ๋ง ์„œ๋น„์Šค")
123
 
124
  # URL ์ž…๋ ฅ ๋ฐ›๊ธฐ
125
+ value = st.query_params['q']
126
+ if value:
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)
133
 
134
  # ๊ฒฐ๊ณผ ํ‘œ์‹œ