Spaces:
Sleeping
Sleeping
Fix: Remove --host flag for zeroclaw, fix Marimo duplicate imports
Browse filesFiles changed (2)
- Dockerfile+1-1
- marimo_sandbox.py+20-24
76 unmodified lines7778798081828376 unmodified linesomniroute start --port $OMNIROUTE_PORT --accounts /app/.omniroute/accounts.json &sleep 3echo "Starting Agent Zero on port 80..."zeroclaw gateway --host 127.0.0.1 --port 80 --config /app/.zeroclaw/config.toml &sleep 5echo "Starting Marimo on port $MARIMO_PORT..."marimo run /app/marimo_sandbox.py --host 127.0.0.1 --port $MARIMO_PORT --headless &76 unmodified lines7778798081828376 unmodified linesomniroute start --port $OMNIROUTE_PORT --accounts /app/.omniroute/accounts.json &sleep 3echo "Starting Agent Zero on port 80..."zeroclaw gateway --port 80 --config /app/.zeroclaw/config.toml &sleep 5echo "Starting Marimo on port $MARIMO_PORT..."marimo run /app/marimo_sandbox.py --host 127.0.0.1 --port $MARIMO_PORT --headless &
12 unmodified lines1314151617181920218 unmodified lines3031323334353637383940414210 unmodified lines5354555657585960613 unmodified lines65666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251267 unmodified lines13413513613713813914014114214312 unmodified linesdef _():import marimo as moimport osWORKSPACE = os.environ.get("WORKSPACE", "/app/workspace")return WORKSPACE, mo@app.cell8 unmodified linesdef _(mo):"""Code Editor Cell"""mo.md("### π» Code Editor")code_editor = mo.ui.code_editor(language="python",value="# Write your code here\nprint('Hello from Marimo Zero!')",label="")def run_code(code):import sysfrom io import StringIO10 unmodified linesreturn mo.md(f"β Error:\n```\n{str(e)}\n```")finally:sys.stdout = old_stdoutresult = run_code(code_editor.value)mo.vstack([code_editor,mo.ui.run_button(label="βΆοΈ Run"),3 unmodified lines@app.celldef _(mo, WORKSPACE):"""File Browser Cell"""mo.md("### π Workspace Files")import osdef list_files():if not os.path.exists(WORKSPACE):return mo.md("β οΈ Workspace not found")files = os.listdir(WORKSPACE)if not files:return mo.md("π Empty workspace")file_list = "\n".join([f"- π `{f}`" for f in sorted(files)])return mo.md(file_list)list_files()return@app.celldef _(mo, WORKSPACE):"""File Editor Cell"""mo.md("### βοΈ File Editor")import osfilename = mo.ui.text(label="Filename:",value="example.md",full_width=False)filepath = os.path.join(WORKSPACE, filename.value)def read_file(name):path = os.path.join(WORKSPACE, name)if os.path.exists(path):with open(path, 'r') as f:return f.read()return "# New file\n\nStart writing..."content = mo.ui.text_area(label="Content:",value=read_file(filename.value),full_width=True,height=300)def save_file(name, text):path = os.path.join(WORKSPACE, name)with open(path, 'w') as f:f.write(text)return mo.md(f"β Saved to `{path}`")mo.vstack([filename,content,7 unmodified linesdef _(mo):"""Terminal Output Cell"""mo.md("### π Output")mo.md("""View execution results, plots, and outputs here.**Tip:** Use `print()` in code cells to see output here.""")return12 unmodified lines1314151617181920218 unmodified lines3031323334353637383940414210 unmodified lines5354555657585960613 unmodified lines65666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211227 unmodified lines13013113213313413513613713813912 unmodified linesdef _():import marimo as moimport osWORKSPACE = os.environ.get("WORKSPACE", "/app/workspace")return WORKSPACE, mo, os@app.cell8 unmodified linesdef _(mo):"""Code Editor Cell"""mo.md("### π» Code Editor")code_editor = mo.ui.code_editor(language="python",value="# Write your code here\nprint('Hello from Marimo Zero!')",label="")def run_code(code):import sysfrom io import StringIO10 unmodified linesreturn mo.md(f"β Error:\n```\n{str(e)}\n```")finally:sys.stdout = old_stdoutresult = run_code(code_editor.value)mo.vstack([code_editor,mo.ui.run_button(label="βΆοΈ Run"),3 unmodified lines@app.celldef _(mo, WORKSPACE, os):"""File Browser Cell"""mo.md("### π Workspace Files")def list_files():if not os.path.exists(WORKSPACE):return mo.md("β οΈ Workspace not found")files = os.listdir(WORKSPACE)if not files:return mo.md("π Empty workspace")file_list = "\n".join([f"- π `{f}`" for f in sorted(files)])return mo.md(file_list)list_files()return@app.celldef _(mo, WORKSPACE, os):"""File Editor Cell"""mo.md("### βοΈ File Editor")filename = mo.ui.text(label="Filename:",value="example.md",full_width=False)filepath = os.path.join(WORKSPACE, filename.value)def read_file(name):path = os.path.join(WORKSPACE, name)if os.path.exists(path):with open(path, 'r') as f:return f.read()return "# New file\n\nStart writing..."content = mo.ui.text_area(label="Content:",value=read_file(filename.value),full_width=True,height=300)def save_file(name, text):path = os.path.join(WORKSPACE, name)with open(path, 'w') as f:f.write(text)return mo.md(f"β Saved to `{path}`")mo.vstack([filename,content,7 unmodified linesdef _(mo):"""Terminal Output Cell"""mo.md("### π Output")mo.md("""View execution results, plots, and outputs here.**Tip:** Use `print()` in code cells to see output here.""")return
Dockerfile+1-1
marimo_sandbox.py+20-24