Spaces:
Running
Running
Download patch_auth_test18.py from Leon4gr45/llama-gemma: direct link, hf CLI and curl.
- Browser
- Download file 598 Bytes
-
https://huggingface.co/spaces/Leon4gr45/llama-gemma/resolve/main/patch_auth_test18.py
- Command line
-
hf download hf://spaces/Leon4gr45/llama-gemma/patch_auth_test18.py
-
curl -L -o patch_auth_test18.py https://huggingface.co/spaces/Leon4gr45/llama-gemma/resolve/main/patch_auth_test18.py
598 Bytes
| with open("gateway.py", "r") as f: | |
| code = f.read() | |
| # Ah! `patch_auth_key12.py` REVERTED the change that made it use `API_KEY`. | |
| # Let's see what `patch_auth_key12.py` did: | |
| # ```python | |
| # sh = sh.replace("/usr/local/bin/llama-swap \\", "env -u API_KEY LLAMA_API_KEY=internal_secret_key /usr/local/bin/llama-swap \\") | |
| # code = code.replace("""LLAMA_API_KEY = os.getenv("LLAMA_API_KEY", "").strip()""", """LLAMA_API_KEY = os.getenv("LLAMA_API_KEY", "internal_secret_key").strip()""") | |
| # ``` | |
| # But wait, later I did `git rm -f ... && git commit --amend` but I didn't push the change correctly maybe? | |