Spaces:
Runtime error
Runtime error
Update app.py
Browse files17 unmodified lines181920212223227 unmodified lines25125225325425525617 unmodified linesfrom bigcodebench.data.utils import CACHE_DIRfrom bigcodebench.eval import PASS, compatible_eval_result, estimate_pass_at_k, untrusted_checkfrom bigcodebench.gen.util import trusted_checkResult = Tuple[str, List[bool]]227 unmodified linesinterface.queue(default_concurrency_limit=None)interface.launch(show_error=True)if __name__ == "__main__":run_gradio()# evaluate("complete", "hard", "meta-llama--Llama-3.2-3B-Instruct--bigcodebench-instruct--vllm-0-1.jsonl")17 unmodified lines18192021222324252627227 unmodified lines25525625725825926026126226326426526626726826927027127227327427527617 unmodified linesfrom bigcodebench.data.utils import CACHE_DIRfrom bigcodebench.eval import PASS, compatible_eval_result, estimate_pass_at_k, untrusted_checkfrom bigcodebench.gen.util import trusted_checkfrom apscheduler.schedulers.background import BackgroundSchedulerREPO_ID = "bigcode/bigcodebench-evaluator"HF_TOKEN = os.environ.get("HF_TOKEN", None)Result = Tuple[str, List[bool]]227 unmodified linesinterface.queue(default_concurrency_limit=None)interface.launch(show_error=True)def restart_space():logging.info(f"Restarting space with repo ID: {REPO_ID}")try:# Now restart the spaceAPI.restart_space(repo_id=REPO_ID, token=HF_TOKEN)logging.info("Space restarted successfully.")except Exception as e:logging.error(f"Failed to restart space: {e}")if __name__ == "__main__":run_gradio()scheduler = BackgroundScheduler()scheduler.add_job(restart_space, "interval", hours=1) # Restart every 1hlogging.info("Scheduler initialized to restart space every 1 hour.")scheduler.start()# evaluate("complete", "hard", "meta-llama--Llama-3.2-3B-Instruct--bigcodebench-instruct--vllm-0-1.jsonl")
app.py+20