xhluca commited on
Commit
65e0af7
·
verified ·
1 Parent(s): 9ac2736

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +139 -1
README.md CHANGED
@@ -34,4 +34,142 @@ tags:
34
 
35
  WARNING: This is not the main WebLINX data card! You might want to use the main WebLINX data card instead:
36
 
37
- > **[WebLINX: Real-World Website Navigation with Multi-Turn Dialogue](https://huggingface.co/datasets/mcgill-nlp/weblinx)**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  WARNING: This is not the main WebLINX data card! You might want to use the main WebLINX data card instead:
36
 
37
+ > **[WebLINX: Real-World Website Navigation with Multi-Turn Dialogue](https://huggingface.co/datasets/mcgill-nlp/weblinx)**
38
+
39
+ ---
40
+
41
+
42
+ <div align="center">
43
+ <h1 style="margin-bottom: 0.5em;">WebLINX: Real-World Website Navigation with Multi-Turn Dialogue</h1>
44
+ <em>Xing Han Lù*, Zdeněk Kasner*, Siva Reddy</em>
45
+ </div>
46
+
47
+ <div style="margin-bottom: 2em"></div>
48
+
49
+
50
+ | [**💾Code**](https://github.com/McGill-NLP/WebLINX) | [**📄Paper**](https://arxiv.org/abs/2402.05930) | [**🌐Website**](https://mcgill-nlp.github.io/weblinx) | [**📓Colab**](https://colab.research.google.com/github/McGill-NLP/weblinx/blob/main/examples/WebLINX_Colab_Notebook.ipynb) |
51
+ | :--: | :--: | :--: | :--: |
52
+ | [**🤖Models**](https://huggingface.co/collections/McGill-NLP/weblinx-models-65c57d4afeeb282d1dcf8434) | [**💻Explorer**](https://huggingface.co/spaces/McGill-NLP/weblinx-explorer) | [**🐦Tweets**](https://twitter.com/sivareddyg/status/1755799365031965140) | [**🏆Leaderboard**](https://paperswithcode.com/sota/conversational-web-navigation-on-weblinx) |
53
+
54
+
55
+ <video width="100%" controls autoplay muted loop>
56
+ <source src="https://huggingface.co/datasets/McGill-NLP/WebLINX/resolve/main/WeblinxWebsiteDemo.mp4?download=false" type="video/mp4">
57
+ Your browser does not support the video tag.
58
+ </video>
59
+
60
+
61
+ > [!IMPORTANT]
62
+ > WebLINX is now available as a benchmark through [BrowserGym](https://github.com/ServiceNow/BrowserGym), allowing you to access demonstration steps in the same way you would access a web agent environment like [WebArena](https://webarena.dev/) or [MiniWoB](https://miniwob.farama.org/index.html). This also allows you to run agents from the [Agentlab](https://github.com/ServiceNow/AgentLab) library, including agents that achieve SOTA performance through Claude-3.5-Sonnet. To enable this integration, we are releasing the `weblinx-browsergym` extension for BrowserGym on PyPi, as well as a [new dataset, WebLINX 1.1, derived from WebLINX on Huggingface](https://huggingface.co/datasets/McGill-NLP/weblinx-browsergym). In WebLINX 1.1, a small number of demonstrations were removed after processing, but no new demonstration was added. There are substantial changes to the steps being evaluated, with the inclusion of tab actions. Please report your results as "WebLINX-1.1", "WebLINX-BrowserGym" or "WebLINX-BG" in your work, to differentiate from the [initial release of weblinx (1.0)](https://huggingface.co/datasets/McGill-NLP/WebLINX/tree/v1.0).
63
+
64
+
65
+ ## Quickstart
66
+
67
+ To get started, simply install `datasets` with `pip install datasets` and load the chat data splits:
68
+
69
+ ```python
70
+ from datasets import load_dataset
71
+ from huggingface_hub import snapshot_download
72
+
73
+ # Load the validation split
74
+ valid = load_dataset("McGill-NLP/weblinx", split="validation")
75
+
76
+ # Download the input templates and use the LLaMA one
77
+ snapshot_download(
78
+ "McGill-NLP/WebLINX", repo_type="dataset", allow_patterns="templates/*", local_dir="."
79
+ )
80
+ with open('templates/llama.txt') as f:
81
+ template = f.read()
82
+
83
+ # To get the input text, simply pass a turn from the valid split to the template
84
+ turn = valid[0]
85
+ turn_text = template.format(**turn)
86
+ ```
87
+
88
+ You can now use `turn_text` as an input to LLaMA-style models. For example, you can use Sheared-LLaMA:
89
+
90
+ ```python
91
+ from transformers import pipeline
92
+
93
+ action_model = pipeline(
94
+ model="McGill-NLP/Sheared-LLaMA-2.7B-weblinx", device=0, torch_dtype='auto'
95
+ )
96
+ out = action_model(turn_text, return_full_text=False, max_new_tokens=64, truncation=True)
97
+ pred = out[0]['generated_text']
98
+
99
+ print("Ref:", turn["action"])
100
+ print("Pred:", pred)
101
+ ```
102
+
103
+ ## Raw Data
104
+
105
+ To use the raw data, you will need to use the `huggingface_hub`:
106
+
107
+ ```python
108
+ from huggingface_hub import snapshot_download
109
+
110
+ # If you want to download the complete dataset (may take a while!)
111
+ snapshot_download(repo_id="McGill-NLP/WebLINX-full", repo_type="dataset", local_dir="./wl_data")
112
+
113
+ # You can download specific demos, for example
114
+ demo_names = ['saabwsg', 'ygprzve', 'iqaazif'] # 3 random demo from valid
115
+ patterns = [f"demonstrations/{name}/*" for name in demo_names]
116
+ snapshot_download(
117
+ repo_id="McGill-NLP/WebLINX-full", repo_type="dataset", local_dir="./wl_data", allow_patterns=patterns
118
+ )
119
+ ```
120
+
121
+ For more information on how to use this data using our [official library](https://github.com/McGill-NLP/WebLINX), please refer to the [WebLINX documentation](https://mcgill-nlp.github.io/weblinx/docs).
122
+
123
+ ## Reranking Data
124
+
125
+ You can also access the data processed for reranking tasks. To do that:
126
+
127
+ ```python
128
+ from datasets import load_dataset
129
+
130
+ path = 'McGill-NLP/WebLINX'
131
+
132
+ # validation split:
133
+ valid = load_dataset(path=path, name='reranking', split='validation')
134
+ # test-iid split
135
+ test_iid = load_dataset(path, 'reranking', split='test_iid')
136
+ # other options: test_cat, test_geo, test_vis, test_web
137
+
138
+ print("Query:")
139
+ print(valid[0]['query'])
140
+
141
+ print("\nPositive:")
142
+ print(valid[0]['positives'][0])
143
+
144
+ print("\nNegative #1:")
145
+ print(valid[0]['negatives'][0])
146
+
147
+ print("\nNegative #2:")
148
+ print(valid[0]['negatives'][1])
149
+ ```
150
+
151
+ ## License and Terms of Use
152
+
153
+ License: The Dataset is made available under the terms of the [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0)](https://creativecommons.org/licenses/by-nc-sa/4.0/deed.en).
154
+
155
+ By downloading this Dataset, you agree to comply with the following terms of use:
156
+ - Restrictions: You agree not to use the Dataset in any way that is unlawful or would infringe upon the rights of others.
157
+ - Acknowledgment: By using the Dataset, you acknowledge that the Dataset may contain data derived from third-party sources, and you agree to abide by any additional terms and conditions that may apply to such third-party data.
158
+ - Fair Use Declaration: The Dataset may be used for research if it constitutes "fair use" under copyright laws within your jurisdiction. You are responsible for ensuring your use complies with applicable laws.
159
+
160
+ Derivatives must also include the terms of use above.
161
+
162
+ ## Citation
163
+
164
+ If you use our dataset, please cite our work as follows:
165
+
166
+ ```bibtex
167
+ @misc{lu-2024-weblinx,
168
+ title={WebLINX: Real-World Website Navigation with Multi-Turn Dialogue},
169
+ author={Xing Han Lù and Zdeněk Kasner and Siva Reddy},
170
+ year={2024},
171
+ eprint={2402.05930},
172
+ archivePrefix={arXiv},
173
+ primaryClass={cs.CL}
174
+ }
175
+ ```