a100 kh commited on
Commit
b522aa4
1 Parent(s): 7b6864b
Files changed (2) hide show
  1. app.py +11 -0
  2. serve/constants.py +1 -1
app.py CHANGED
@@ -46,6 +46,17 @@ from serve.utils import (
46
  alert_js,
47
  parse_gradio_auth_creds,
48
  )
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  logger = build_logger("gradio_web_server_multi", "gradio_web_server_multi.log")
51
 
 
46
  alert_js,
47
  parse_gradio_auth_creds,
48
  )
49
+ from huggingface_hub import CommitScheduler
50
+
51
+
52
+ scheduler = CommitScheduler(
53
+ repo_id="kanhatakeyama/chatbotarena-ja-log", # Replace with your actual repo ID
54
+ repo_type="dataset",
55
+ folder_path=".",
56
+ path_in_repo="data",
57
+ every=60, # Upload every 1 minutes
58
+ )
59
+
60
 
61
  logger = build_logger("gradio_web_server_multi", "gradio_web_server_multi.log")
62
 
serve/constants.py CHANGED
@@ -50,7 +50,7 @@ CONTROLLER_HEART_BEAT_EXPIRATION = int(
50
  WORKER_HEART_BEAT_INTERVAL = int(
51
  os.getenv("FASTCHAT_WORKER_HEART_BEAT_INTERVAL", 45))
52
  WORKER_API_TIMEOUT = int(os.getenv("FASTCHAT_WORKER_API_TIMEOUT", 100))
53
- WORKER_API_TIMEOUT = 3000
54
  WORKER_API_EMBEDDING_BATCH_SIZE = int(
55
  os.getenv("FASTCHAT_WORKER_API_EMBEDDING_BATCH_SIZE", 4)
56
  )
 
50
  WORKER_HEART_BEAT_INTERVAL = int(
51
  os.getenv("FASTCHAT_WORKER_HEART_BEAT_INTERVAL", 45))
52
  WORKER_API_TIMEOUT = int(os.getenv("FASTCHAT_WORKER_API_TIMEOUT", 100))
53
+ # WORKER_API_TIMEOUT = 3000
54
  WORKER_API_EMBEDDING_BATCH_SIZE = int(
55
  os.getenv("FASTCHAT_WORKER_API_EMBEDDING_BATCH_SIZE", 4)
56
  )