""" Hugging Face Spaces - Full Cyberpunk UI for malloc() """ import os import spaces import gradio as gr from pathlib import Path from app.main import app as fastapi_app # ZeroGPU decorator @spaces.GPU def predict_gpu(prompt: str = ""): return "malloc() ZeroGPU engine active" # Read your exact HTML, CSS, and JS static_dir = Path("app/static") html_file = static_dir / "index.html" css_file = static_dir / "style.css" js_file = static_dir / "app.js" html_code = html_file.read_text(encoding="utf-8") if html_file.exists() else "

Loading malloc()...

" css_code = css_file.read_text(encoding="utf-8") if css_file.exists() else "" js_code = js_file.read_text(encoding="utf-8") if js_file.exists() else "" # Extract inner body content if "", 1)[1] if "", html_code.find("")] else: body_content = html_code # Inject full cyberpunk styles and behavior custom_head = f""" """ with gr.Blocks(title="malloc() — AI Career OS", head=custom_head) as demo: gr.HTML(body_content) demo.launch(server_name="0.0.0.0", server_port=7860)