Download patch_queue.py from Leon4gr45/agent-0: direct link, hf CLI and curl.
- Browser
- Download file 737 Bytes
-
https://huggingface.co/spaces/Leon4gr45/agent-0/resolve/main/patch_queue.py
- Command line
-
hf download hf://spaces/Leon4gr45/agent-0/patch_queue.py
-
curl -L -o patch_queue.py https://huggingface.co/spaces/Leon4gr45/agent-0/resolve/main/patch_queue.py
737 Bytes
| with open("api.py", "r") as f: | |
| content = f.read() | |
| import re | |
| content = re.sub(r'( if huey is None:\n raise HTTPException\(status_code=503, detail="Job functionality disabled: Huey/Redis unavailable."\)\n)+', r' if huey is None:\n raise HTTPException(status_code=503, detail="Job functionality disabled: Huey/Redis unavailable.")\n', content) | |
| content = re.sub(r'( if huey is None:\n raise HTTPException\(status_code=503, detail="Job functionality disabled: Huey/Redis unavailable."\)\n)+', r' if huey is None:\n raise HTTPException(status_code=503, detail="Job functionality disabled: Huey/Redis unavailable.")\n', content) | |
| with open("api.py", "w") as f: | |
| f.write(content) | |