Spaces:
Runtime error
Runtime error
feat: add a thread to push every x sec
Browse files12 unmodified lines13141516171826 unmodified lines45464748495012 unmodified linesBOT_NAME = "PersianGPT-FT"PUSH_FREQUENCY = 60 # every minuterepo = Repository(local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN)stop_sequences = [] #["<|endoftext|>",">"]26 unmodified lines# call again in 60 secondsthreading.Timer(PUSH_FREQUENCY, asynchronous_push, [f_stop]).start()def vote(data: gr.LikeData):if data.liked:print("You upvoted this response: " + data.value)12 unmodified lines131415161718192026 unmodified lines47484950515253545512 unmodified linesBOT_NAME = "PersianGPT-FT"PUSH_FREQUENCY = 60 # every minuteDATA_FILENAME = "data.jsonl"DATA_FILE = os.path.join("data", DATA_FILENAME)repo = Repository(local_dir="data", clone_from=DATASET_REPO_URL, use_auth_token=HF_TOKEN)stop_sequences = [] #["<|endoftext|>",">"]26 unmodified lines# call again in 60 secondsthreading.Timer(PUSH_FREQUENCY, asynchronous_push, [f_stop]).start()f_stop = threading.Event()asynchronous_push(f_stop)def vote(data: gr.LikeData):if data.liked:print("You upvoted this response: " + data.value)
app.py+5