Roberta2024 commited on
Commit
20e1608
·
verified ·
1 Parent(s): 72f7a9b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -70,6 +70,9 @@ def plot_keywords(keywords, title):
70
  # 建立Streamlit網頁應用程式
71
  st.title("🤙🤙🤙YAHOO新聞關鍵詞提取工具👂👂")
72
 
 
 
 
73
  # 抓取Yahoo新聞的URL輸入框
74
  url = st.text_input("請輸入Yahoo新聞的URL:")
75
 
@@ -85,9 +88,6 @@ if st.button("抓取並提取關鍵詞"):
85
  st.write("新聞內容的DataFrame:")
86
  st.write(df)
87
 
88
- # 設置MMR多樣性參數
89
- diversity = st.slider("選擇MMR多樣性參數", 0.0, 1.0, 0.7)
90
-
91
  # 提取關鍵詞
92
  keywords = extract_keywords(content, diversity=diversity)
93
  st.write("關鍵詞提取結果:")
 
70
  # 建立Streamlit網頁應用程式
71
  st.title("🤙🤙🤙YAHOO新聞關鍵詞提取工具👂👂")
72
 
73
+ # 設置MMR多樣性參數
74
+ diversity = st.slider("選擇MMR多樣性參數", 0.0, 1.0, 0.7)
75
+
76
  # 抓取Yahoo新聞的URL輸入框
77
  url = st.text_input("請輸入Yahoo新聞的URL:")
78
 
 
88
  st.write("新聞內容的DataFrame:")
89
  st.write(df)
90
 
 
 
 
91
  # 提取關鍵詞
92
  keywords = extract_keywords(content, diversity=diversity)
93
  st.write("關鍵詞提取結果:")