Download health_server.py from ummmar/cloudcode: direct link, hf CLI and curl.
- Browser
- Download file 382 Bytes
-
https://huggingface.co/spaces/ummmar/cloudcode/resolve/main/health_server.py
- Command line
-
hf download hf://spaces/ummmar/cloudcode/health_server.py
-
curl -L -o health_server.py https://huggingface.co/spaces/ummmar/cloudcode/resolve/main/health_server.py
382 Bytes
| from http.server import BaseHTTPRequestHandler, HTTPServer | |
| class HealthHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): | |
| self.send_response(200) | |
| self.end_headers() | |
| self.wfile.write(b"OK") | |
| def log_message(self, format, *args): | |
| pass # Suppress logs | |
| if __name__ == '__main__': | |
| HTTPServer(('0.0.0.0', 8080), HealthHandler).serve_forever() |