Download fix_app_cache.py from ILRDF-Lowking/truku-interactive-lesson: direct link, hf CLI and curl.
- Browser
- Download file 436 Bytes
-
https://huggingface.co/spaces/ILRDF-Lowking/truku-interactive-lesson/resolve/main/fix_app_cache.py
- Command line
-
hf download hf://spaces/ILRDF-Lowking/truku-interactive-lesson/fix_app_cache.py
-
curl -L -o fix_app_cache.py https://huggingface.co/spaces/ILRDF-Lowking/truku-interactive-lesson/resolve/main/fix_app_cache.py
436 Bytes
| import re | |
| with open('public/js/app.js', 'r', encoding='utf-8') as f: | |
| js = f.read() | |
| # Fix cache busting for prompts.json | |
| js = js.replace("fetch('/data/prompts.json')", "fetch('/data/prompts.json?v=' + Date.now())") | |
| # Fix button copy text | |
| js = re.sub(r"btn\.innerHTML = '.*?請貼到.*?';", "btn.innerHTML = '✅ 已複製!請貼給 Antigravity';", js) | |
| with open('public/js/app.js', 'w', encoding='utf-8') as f: | |
| f.write(js) | |