Download litellm/proxy/queue/celery_worker.py from nonhuman/nnnn: direct link, hf CLI and curl.
- Browser
- Download file 312 Bytes
-
https://huggingface.co/spaces/nonhuman/nnnn/resolve/main/litellm/proxy/queue/celery_worker.py
- Command line
-
hf download hf://spaces/nonhuman/nnnn/litellm/proxy/queue/celery_worker.py
-
curl -L -o celery_worker.py https://huggingface.co/spaces/nonhuman/nnnn/resolve/main/litellm/proxy/queue/celery_worker.py
312 Bytes
| import os | |
| from multiprocessing import Process | |
| def run_worker(cwd): | |
| os.chdir(cwd) | |
| os.system("celery -A celery_app.celery_app worker --concurrency=120 --loglevel=info") | |
| def start_worker(cwd): | |
| cwd += "/queue" | |
| worker_process = Process(target=run_worker, args=(cwd,)) | |
| worker_process.start() | |