Spaces:
Sleeping
Sleeping
| import pathlib, re | |
| print("Starting patch v15...") | |
| f2 = pathlib.Path('/usr/local/lib/python3.10/site-packages/gradio/blocks.py') | |
| txt2 = f2.read_text() | |
| txt2 = re.sub( | |
| r'raise ValueError\([^"]*"When localhost is not accessible[^)]*\)', | |
| 'pass # HF patch', | |
| txt2, flags=re.DOTALL | |
| ) | |
| f2.write_text(txt2) | |
| print("✅ blocks.py patched") | |
| print("✅ All done!") |