admin commited on
Commit
2b65c98
1 Parent(s): 2d254f3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -180,13 +180,13 @@ def activate(hf_users: str, ms_users: str):
180
  return pd.DataFrame(output)
181
 
182
 
183
- def monitor(hf_users: str, ms_users: str, period=1):
184
  if schedule.get_jobs():
185
  return
186
 
187
  print(f"监控开启中...每日触发")
188
  fixed_activate = partial(activate, hf_users=hf_users, ms_users=ms_users)
189
- schedule.every(period).days.do(fixed_activate)
190
  while True:
191
  schedule.run_pending()
192
  time.sleep(DELAY)
@@ -205,8 +205,8 @@ with gr.Blocks() as iface:
205
  title="Start keeping all spaces active daily",
206
  fn=monitor,
207
  inputs=[
208
- gr.Textbox(label="HuggingFace", placeholder="Usernames joint by ;"),
209
- gr.Textbox(label="ModelScope", placeholder="Usernames joint by ;"),
210
  ],
211
  outputs=None,
212
  allow_flagging=False,
 
180
  return pd.DataFrame(output)
181
 
182
 
183
+ def monitor(hf_users: str, ms_users: str, period=6):
184
  if schedule.get_jobs():
185
  return
186
 
187
  print(f"监控开启中...每日触发")
188
  fixed_activate = partial(activate, hf_users=hf_users, ms_users=ms_users)
189
+ schedule.every(period).hours.do(fixed_activate)
190
  while True:
191
  schedule.run_pending()
192
  time.sleep(DELAY)
 
205
  title="Start keeping all spaces active daily",
206
  fn=monitor,
207
  inputs=[
208
+ gr.Textbox(label="HuggingFace", value="monet-joe;MuGeminorum;ccmusic-database"),
209
+ gr.Textbox(label="ModelScope", value="monetjoe;MuGeminorum;ccmusic"),
210
  ],
211
  outputs=None,
212
  allow_flagging=False,