jeffaudi's picture
Enhance demo functionality by adding model selection and updating confidence threshold. Update README and CSS for improved clarity and layout. Adjust prediction data for better accuracy and performance.
cb1253f
Raw History Blame Contribute Delete
743 Bytes
#!/usr/bin/env python3
"""Local static server with Cache-Control: no-store (port 7860)."""
from http.server import SimpleHTTPRequestHandler, ThreadingHTTPServer
PORT = 7860
class NoCacheHandler(SimpleHTTPRequestHandler):
def end_headers(self) -> None:
self.send_header("Cache-Control", "no-store, no-cache, must-revalidate, max-age=0")
self.send_header("Pragma", "no-cache")
self.send_header("Expires", "0")
super().end_headers()
if __name__ == "__main__":
httpd = ThreadingHTTPServer(("127.0.0.1", PORT), NoCacheHandler)
print(f"Serving on http://127.0.0.1:{PORT} (no-cache)")
try:
httpd.serve_forever()
except KeyboardInterrupt:
print()
httpd.server_close()