duwing commited on
Commit
5a17582
·
verified ·
1 Parent(s): cfe892d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -103,7 +103,7 @@ def get_comments(news_url):
103
  if article is None:
104
  article = article_soup.select_one("#articeBody")
105
 
106
- return title, article, processing_data(json_data['result']['commentList'])
107
 
108
  def processing_data(comments):
109
  comment_list = []
@@ -114,8 +114,8 @@ def processing_data(comments):
114
 
115
 
116
  def main():
 
117
  sentiment_model = create_sentiment_bert()
118
-
119
  st.title("웹 컨텐츠 스크래퍼")
120
 
121
  # URL 입력 받기
 
103
  if article is None:
104
  article = article_soup.select_one("#articeBody")
105
 
106
+ return title.text.strip(), article.text.strip(), processing_data(json_data['result']['commentList'])
107
 
108
  def processing_data(comments):
109
  comment_list = []
 
114
 
115
 
116
  def main():
117
+ global sentiment_model
118
  sentiment_model = create_sentiment_bert()
 
119
  st.title("웹 컨텐츠 스크래퍼")
120
 
121
  # URL 입력 받기