Spaces:
Sleeping
Sleeping
Update app.py
Browse files117 unmodified lines118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148117 unmodified linesdef main():global sentiment_modelsentiment_model = create_sentiment_bert()st.title("๋๊ธ ํํฐ๋ง ์๋น์ค")# URL ์ ๋ ฅ ๋ฐ๊ธฐvalue = st.query_params['q']if value:url = st.text_input("url์ ์ ๋ ฅํ์ธ์",value=st.query_params['q'])else:url = st.text_input("url์ ์ ๋ ฅํ์ธ์")if value:title, content, comments = get_comments(url)# ๊ฒฐ๊ณผ ํ์st.subheader("๊ธฐ์ฌ ์ ๋ชฉ")st.write(title)st.subheader("๋ณธ๋ฌธ ๋ด์ฉ")st.write(content)st.subheader("๋๊ธ")for comment in comments:if evaluation_predict(comment) == 1:st.write(comment)if st.button("์คํฌ๋ฉ ์์"):117 unmodified lines118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148117 unmodified linesdef main():global sentiment_modeltitle = ''content = ''comments = []sentiment_model = create_sentiment_bert()st.title("๋๊ธ ํํฐ๋ง ์๋น์ค")# URL ์ ๋ ฅ ๋ฐ๊ธฐif "q" in st.query_params:value = st.query_params['q']url = st.text_input("url์ ์ ๋ ฅํ์ธ์",value=st.query_params['q'])title, content, comments = get_comments(url)# ๊ฒฐ๊ณผ ํ์st.subheader("๊ธฐ์ฌ ์ ๋ชฉ")st.write(title)st.subheader("๋ณธ๋ฌธ ๋ด์ฉ")st.write(content)st.subheader("๋๊ธ")for comment in comments:if evaluation_predict(comment) == 1:st.write(comment)else:url = st.text_input("url์ ์ ๋ ฅํ์ธ์")if st.button("์คํฌ๋ฉ ์์"):
app.py+18-18