Download agent/coder.py from akborana4/aics: direct link, hf CLI and curl.
- Browser
- Download file 493 Bytes
-
https://huggingface.co/spaces/akborana4/aics/resolve/main/agent/coder.py
- Command line
-
hf download hf://spaces/akborana4/aics/agent/coder.py
-
curl -L -o coder.py https://huggingface.co/spaces/akborana4/aics/resolve/main/agent/coder.py
493 Bytes
| from agent.file_ops import write | |
| def coder(plan, ws): | |
| write(f"{ws}/index.html", | |
| """<!doctype html> | |
| <div id="root"></div> | |
| <script type="module" src="/src/main.jsx"></script> | |
| """) | |
| write(f"{ws}/src/main.jsx", | |
| """import React from "react"; | |
| import { createRoot } from "react-dom/client"; | |
| import App from "./App"; | |
| createRoot(document.getElementById("root")).render(<App />); | |
| """) | |
| write(f"{ws}/src/App.jsx", | |
| f"""export default function App() {{ | |
| return <h1>{plan['goal']}</h1> | |
| }} | |
| """) |