FiberGate / tools /serve.py
AzizMiladi's picture
chore: git mv scripts, UI, dev tools, docs into folders
70c46cc
Raw
History Blame
461 Bytes
import http.server, socketserver
class CORSRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
super().end_headers()
# This matches the port Label Studio is looking for in your screenshot
PORT = 8081
with socketserver.TCPServer(("", PORT), CORSRequestHandler) as httpd:
print(f"🚀 Image server active at http://localhost:{PORT}")
httpd.serve_forever()