Feature Extraction
Transformers
Safetensors
Laya
English
multilingual
laya_browser
custom_code
system-1
browser-agent
web-navigation
decision-model
mmbert
mind2web
tilelang
Instructions to use cklxx/laya-browser with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cklxx/laya-browser with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="cklxx/laya-browser", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("cklxx/laya-browser", trust_remote_code=True, device_map="auto") - Laya
How to use cklxx/laya-browser with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Download code/apps/browser_task.py from cklxx/laya-browser: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/cklxx/laya-browser/resolve/main/code/apps/browser_task.py
- Command line
-
hf download hf://cklxx/laya-browser/code/apps/browser_task.py
-
curl -L -o browser_task.py https://huggingface.co/cklxx/laya-browser/resolve/main/code/apps/browser_task.py
1.32 kB
| import os, sys, json, time | |
| sys.path.insert(0, "/home/ckl/projects/S/jev-ultrafast") | |
| os.environ.update(BU_CDP_URL="http://127.0.0.1:9222", TYPESAFE_BASE_URL="http://127.0.0.1:8791", TYPESAFE_API_KEY="local", | |
| TEXT_MODEL_API_KEY="local", TEXT_MODEL_BASE_URL="http://127.0.0.1:30000/v1", TEXT_MODEL="Qwen/Qwen3-4B-AWQ", | |
| TEXT_MODEL_EXTRA_JSON='{"chat_template_kwargs": {"enable_thinking": false}}') | |
| from jev_ultrafast import Agent | |
| url = sys.argv[1]; goal = sys.argv[2] | |
| t = time.time() | |
| with Agent(url, goal) as agent: | |
| print("elements on first page:", len(agent.snapshot()["elements"]), "| title:", agent.state["page"]["title"]) | |
| for state in agent.run(): | |
| h = state["history"][-1] if state["history"] else None | |
| d = state["decisions"][-1] if state["decisions"] else None | |
| print(f"{state['elapsed_ms']:6d} ms status={state['status']:9s} op={d['operation'] if d else None:9s} " | |
| f"conf={d['confidence'] if d else 0:.2f} model={d['latency_ms'] if d else 0:4d}ms " | |
| f"action={h['action'][:60] if h else None} text={h['text'] if h else None}") | |
| if len(state["history"]) > 25: break | |
| print("FINAL:", state["status"], "| url:", state["page"]["url"], "| title:", state["page"]["title"], "| wall", round(time.time() - t, 1), "s") | |