BarngSJ commited on
Commit
d36b4bb
·
1 Parent(s): 2b6767e
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -6,11 +6,11 @@ import threading
6
 
7
  # Function to execute your scripts
8
  def job():
9
- st.write("Running scheduled scripts...")
10
  subprocess.run(["python", "scrap_data_from_FN.py"])
11
  time.sleep(20)
12
  subprocess.run(["python", "run_at_morning.py"])
13
- st.write("Scripts executed successfully!")
14
 
15
  # Schedule the job at 04:00 AM daily
16
  schedule.every().day.at("04:00").do(job)
@@ -25,10 +25,10 @@ def run_scheduler():
25
  threading.Thread(target=run_scheduler, daemon=True).start()
26
 
27
  # Streamlit UI
28
- st.title("Automated Script Runner on Hugging Face Spaces")
29
- st.write("This app automatically runs scripts at 04:00 AM.")
30
 
31
- if st.button("Run Now"):
32
  job()
33
- st.success("Scripts executed manually!")
34
 
 
6
 
7
  # Function to execute your scripts
8
  def job():
9
+ st.write("スクリプト実行完了")
10
  subprocess.run(["python", "scrap_data_from_FN.py"])
11
  time.sleep(20)
12
  subprocess.run(["python", "run_at_morning.py"])
13
+ st.write("作業完了")
14
 
15
  # Schedule the job at 04:00 AM daily
16
  schedule.every().day.at("04:00").do(job)
 
25
  threading.Thread(target=run_scheduler, daemon=True).start()
26
 
27
  # Streamlit UI
28
+ st.title("FN スクレイピングアプリ")
29
+ st.write("アプリは午前4時に自動で回るように設定されています。")
30
 
31
+ if st.button("実行"):
32
  job()
33
+ st.success("手動実行")
34