Logger examples¶
Installation & set up¶
In [1]:
Copied!
!pip install lavague
import os
# Check if running in Google Colab
try:
from google.colab import userdata
IN_COLAB = True
except ImportError:
IN_COLAB = False
if IN_COLAB:
os.environ["OPENAI_API_KEY"] = userdata.get('OPENAI_API_KEY')
else:
os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY')
!pip install lavague
import os
# Check if running in Google Colab
try:
from google.colab import userdata
IN_COLAB = True
except ImportError:
IN_COLAB = False
if IN_COLAB:
os.environ["OPENAI_API_KEY"] = userdata.get('OPENAI_API_KEY')
else:
os.environ["OPENAI_API_KEY"] = os.getenv('OPENAI_API_KEY')
Collecting lavague
Downloading lavague-1.1.2-py3-none-any.whl (8.2 kB)
Collecting lavague-contexts-openai<0.3.0,>=0.2.0 (from lavague)
Downloading lavague_contexts_openai-0.2.0-py3-none-any.whl (2.4 kB)
Collecting lavague-core<0.3.0,>=0.2.11 (from lavague)
Downloading lavague_core-0.2.12-py3-none-any.whl (33 kB)
Collecting lavague-drivers-selenium<0.3.0,>=0.2.2 (from lavague)
Downloading lavague_drivers_selenium-0.2.2.post2-py3-none-any.whl (6.9 kB)
Collecting lavague-gradio<0.3.0,>=0.2.1 (from lavague)
Downloading lavague_gradio-0.2.2-py3-none-any.whl (3.7 kB)
Collecting llama-index-embeddings-openai<0.2.0,>=0.1.9 (from lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading llama_index_embeddings_openai-0.1.10-py3-none-any.whl (6.2 kB)
Collecting llama-index-llms-azure-openai<0.2.0,>=0.1.8 (from lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading llama_index_llms_azure_openai-0.1.8-py3-none-any.whl (4.9 kB)
Collecting llama-index-llms-openai<0.2.0,>=0.1.9 (from lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading llama_index_llms_openai-0.1.22-py3-none-any.whl (11 kB)
Collecting llama-index-multi-modal-llms-azure-openai<0.2.0,>=0.1.4 (from lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading llama_index_multi_modal_llms_azure_openai-0.1.4-py3-none-any.whl (3.7 kB)
Collecting llama-index-multi-modal-llms-openai<0.2.0,>=0.1.6 (from lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading llama_index_multi_modal_llms_openai-0.1.6-py3-none-any.whl (5.8 kB)
Requirement already satisfied: ipython<8.0.0,>=7.34.0 in /usr/local/lib/python3.10/dist-packages (from lavague-core<0.3.0,>=0.2.11->lavague) (7.34.0)
Collecting langchain<0.2.0,>=0.1.20 (from lavague-core<0.3.0,>=0.2.11->lavague)
Downloading langchain-0.1.20-py3-none-any.whl (1.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 34.4 MB/s eta 0:00:00
Collecting llama-index<0.11.0,>=0.10.19 (from lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index-0.10.43-py3-none-any.whl (6.8 kB)
Collecting llama-index-retrievers-bm25<0.2.0,>=0.1.3 (from lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_retrievers_bm25-0.1.3-py3-none-any.whl (2.9 kB)
Collecting lxml<6.0.0,>=5.1.1 (from lavague-core<0.3.0,>=0.2.11->lavague)
Downloading lxml-5.2.2-cp310-cp310-manylinux_2_28_x86_64.whl (5.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.0/5.0 MB 49.0 MB/s eta 0:00:00
Collecting lxml-html-clean<0.2.0,>=0.1.1 (from lavague-core<0.3.0,>=0.2.11->lavague)
Downloading lxml_html_clean-0.1.1-py3-none-any.whl (11 kB)
Requirement already satisfied: msgpack<2.0.0,>=1.0.8 in /usr/local/lib/python3.10/dist-packages (from lavague-core<0.3.0,>=0.2.11->lavague) (1.0.8)
Collecting trafilatura<2.0.0,>=1.9.0 (from lavague-core<0.3.0,>=0.2.11->lavague)
Downloading trafilatura-1.10.0-py3-none-any.whl (1.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 20.7 MB/s eta 0:00:00
Collecting selenium<5.0.0,>=4.18.1 (from lavague-drivers-selenium<0.3.0,>=0.2.2->lavague)
Downloading selenium-4.21.0-py3-none-any.whl (9.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.5/9.5 MB 27.4 MB/s eta 0:00:00
Collecting gradio==4.26.0 (from lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading gradio-4.26.0-py3-none-any.whl (17.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 17.1/17.1 MB 32.5 MB/s eta 0:00:00
Collecting aiofiles<24.0,>=22.0 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading aiofiles-23.2.1-py3-none-any.whl (15 kB)
Requirement already satisfied: altair<6.0,>=4.2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (4.2.2)
Collecting fastapi (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading fastapi-0.111.0-py3-none-any.whl (91 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 92.0/92.0 kB 3.5 MB/s eta 0:00:00
Collecting ffmpy (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading ffmpy-0.3.2.tar.gz (5.5 kB)
Preparing metadata (setup.py) ... done
Collecting gradio-client==0.15.1 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading gradio_client-0.15.1-py3-none-any.whl (313 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 313.6/313.6 kB 10.3 MB/s eta 0:00:00
Collecting httpx>=0.24.1 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading httpx-0.27.0-py3-none-any.whl (75 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 75.6/75.6 kB 7.1 MB/s eta 0:00:00
Requirement already satisfied: huggingface-hub>=0.19.3 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.23.2)
Requirement already satisfied: importlib-resources<7.0,>=1.3 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (6.4.0)
Requirement already satisfied: jinja2<4.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.1.4)
Requirement already satisfied: markupsafe~=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2.1.5)
Requirement already satisfied: matplotlib~=3.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.7.1)
Requirement already satisfied: numpy~=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (1.25.2)
Collecting orjson~=3.0 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading orjson-3.10.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 142.5/142.5 kB 1.4 MB/s eta 0:00:00
Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (24.0)
Requirement already satisfied: pandas<3.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2.0.3)
Requirement already satisfied: pillow<11.0,>=8.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (9.4.0)
Requirement already satisfied: pydantic>=2.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2.7.3)
Collecting pydub (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting python-multipart>=0.0.9 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading python_multipart-0.0.9-py3-none-any.whl (22 kB)
Requirement already satisfied: pyyaml<7.0,>=5.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (6.0.1)
Collecting ruff>=0.2.2 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading ruff-0.4.8-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.8/8.8 MB 44.5 MB/s eta 0:00:00
Collecting semantic-version~=2.0 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting tomlkit==0.12.0 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading tomlkit-0.12.0-py3-none-any.whl (37 kB)
Requirement already satisfied: typer[all]<1.0,>=0.9 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.9.4)
Requirement already satisfied: typing-extensions~=4.0 in /usr/local/lib/python3.10/dist-packages (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (4.12.1)
Collecting uvicorn>=0.14.0 (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading uvicorn-0.30.1-py3-none-any.whl (62 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.4/62.4 kB 7.8 MB/s eta 0:00:00
Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from gradio-client==0.15.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2023.6.0)
Collecting websockets<12.0,>=10.0 (from gradio-client==0.15.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading websockets-11.0.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (129 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 129.9/129.9 kB 17.8 MB/s eta 0:00:00
Requirement already satisfied: setuptools>=18.5 in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (67.7.2)
Collecting jedi>=0.16 (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading jedi-0.19.1-py2.py3-none-any.whl (1.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 77.9 MB/s eta 0:00:00
Requirement already satisfied: decorator in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (4.4.2)
Requirement already satisfied: pickleshare in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (0.7.5)
Requirement already satisfied: traitlets>=4.2 in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (5.7.1)
Requirement already satisfied: prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (3.0.45)
Requirement already satisfied: pygments in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (2.16.1)
Requirement already satisfied: backcall in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (0.2.0)
Requirement already satisfied: matplotlib-inline in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (0.1.7)
Requirement already satisfied: pexpect>4.3 in /usr/local/lib/python3.10/dist-packages (from ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (4.9.0)
Requirement already satisfied: SQLAlchemy<3,>=1.4 in /usr/local/lib/python3.10/dist-packages (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (2.0.30)
Requirement already satisfied: aiohttp<4.0.0,>=3.8.3 in /usr/local/lib/python3.10/dist-packages (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (3.9.5)
Requirement already satisfied: async-timeout<5.0.0,>=4.0.0 in /usr/local/lib/python3.10/dist-packages (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (4.0.3)
Collecting dataclasses-json<0.7,>=0.5.7 (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading dataclasses_json-0.6.6-py3-none-any.whl (28 kB)
Collecting langchain-community<0.1,>=0.0.38 (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading langchain_community-0.0.38-py3-none-any.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 85.3 MB/s eta 0:00:00
Collecting langchain-core<0.2.0,>=0.1.52 (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading langchain_core-0.1.52-py3-none-any.whl (302 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 302.9/302.9 kB 39.9 MB/s eta 0:00:00
Collecting langchain-text-splitters<0.1,>=0.0.1 (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading langchain_text_splitters-0.0.2-py3-none-any.whl (23 kB)
Collecting langsmith<0.2.0,>=0.1.17 (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading langsmith-0.1.75-py3-none-any.whl (124 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.9/124.9 kB 20.0 MB/s eta 0:00:00
Requirement already satisfied: requests<3,>=2 in /usr/local/lib/python3.10/dist-packages (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (2.31.0)
Requirement already satisfied: tenacity<9.0.0,>=8.1.0 in /usr/local/lib/python3.10/dist-packages (from langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (8.3.0)
Collecting llama-index-agent-openai<0.3.0,>=0.1.4 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_agent_openai-0.2.7-py3-none-any.whl (12 kB)
Collecting llama-index-cli<0.2.0,>=0.1.2 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_cli-0.1.12-py3-none-any.whl (26 kB)
Collecting llama-index-core==0.10.43 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_core-0.10.43-py3-none-any.whl (15.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.4/15.4 MB 88.0 MB/s eta 0:00:00
Collecting llama-index-indices-managed-llama-cloud<0.2.0,>=0.1.2 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_indices_managed_llama_cloud-0.1.6-py3-none-any.whl (6.7 kB)
Collecting llama-index-legacy<0.10.0,>=0.9.48 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_legacy-0.9.48-py3-none-any.whl (2.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 88.1 MB/s eta 0:00:00
Collecting llama-index-program-openai<0.2.0,>=0.1.3 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_program_openai-0.1.6-py3-none-any.whl (5.2 kB)
Collecting llama-index-question-gen-openai<0.2.0,>=0.1.2 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_question_gen_openai-0.1.3-py3-none-any.whl (2.9 kB)
Collecting llama-index-readers-file<0.2.0,>=0.1.4 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_readers_file-0.1.23-py3-none-any.whl (36 kB)
Collecting llama-index-readers-llama-parse<0.2.0,>=0.1.2 (from llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_index_readers_llama_parse-0.1.4-py3-none-any.whl (2.5 kB)
Collecting deprecated>=1.2.9.3 (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading Deprecated-1.2.14-py2.py3-none-any.whl (9.6 kB)
Collecting dirtyjson<2.0.0,>=1.0.8 (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading dirtyjson-1.0.8-py3-none-any.whl (25 kB)
Collecting llamaindex-py-client<0.2.0,>=0.1.18 (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llamaindex_py_client-0.1.19-py3-none-any.whl (141 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 141.9/141.9 kB 20.5 MB/s eta 0:00:00
Requirement already satisfied: nest-asyncio<2.0.0,>=1.5.8 in /usr/local/lib/python3.10/dist-packages (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (1.6.0)
Requirement already satisfied: networkx>=3.0 in /usr/local/lib/python3.10/dist-packages (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (3.3)
Requirement already satisfied: nltk<4.0.0,>=3.8.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (3.8.1)
Collecting openai>=1.1.0 (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading openai-1.32.0-py3-none-any.whl (325 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 325.2/325.2 kB 39.5 MB/s eta 0:00:00
Collecting tiktoken>=0.3.3 (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading tiktoken-0.7.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 69.6 MB/s eta 0:00:00
Requirement already satisfied: tqdm<5.0.0,>=4.66.1 in /usr/local/lib/python3.10/dist-packages (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (4.66.4)
Collecting typing-inspect>=0.8.0 (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading typing_inspect-0.9.0-py3-none-any.whl (8.8 kB)
Requirement already satisfied: wrapt in /usr/local/lib/python3.10/dist-packages (from llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (1.14.1)
Collecting azure-identity<2.0.0,>=1.15.0 (from llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading azure_identity-1.16.0-py3-none-any.whl (166 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 166.1/166.1 kB 24.3 MB/s eta 0:00:00
Collecting rank-bm25<0.3.0,>=0.2.2 (from llama-index-retrievers-bm25<0.2.0,>=0.1.3->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading rank_bm25-0.2.2-py3-none-any.whl (8.6 kB)
Requirement already satisfied: urllib3[socks]<3,>=1.26 in /usr/local/lib/python3.10/dist-packages (from selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague) (2.0.7)
Collecting trio~=0.17 (from selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague)
Downloading trio-0.25.1-py3-none-any.whl (467 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 467.7/467.7 kB 47.8 MB/s eta 0:00:00
Collecting trio-websocket~=0.9 (from selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague)
Downloading trio_websocket-0.11.1-py3-none-any.whl (17 kB)
Requirement already satisfied: certifi>=2021.10.8 in /usr/local/lib/python3.10/dist-packages (from selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague) (2024.6.2)
Collecting courlan>=1.1.0 (from trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading courlan-1.2.0-py3-none-any.whl (33 kB)
Collecting htmldate>=1.8.1 (from trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading htmldate-1.8.1-py3-none-any.whl (31 kB)
Collecting justext>=3.0.1 (from trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading jusText-3.0.1-py2.py3-none-any.whl (837 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 837.8/837.8 kB 62.8 MB/s eta 0:00:00
Requirement already satisfied: charset-normalizer>=3.2.0 in /usr/local/lib/python3.10/dist-packages (from trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague) (3.3.2)
Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (1.3.1)
Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (23.2.0)
Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (1.4.1)
Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (6.0.5)
Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp<4.0.0,>=3.8.3->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (1.9.4)
Requirement already satisfied: entrypoints in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.4)
Requirement already satisfied: jsonschema>=3.0 in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (4.19.2)
Requirement already satisfied: toolz in /usr/local/lib/python3.10/dist-packages (from altair<6.0,>=4.2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.12.1)
Collecting azure-core>=1.23.0 (from azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading azure_core-1.30.2-py3-none-any.whl (194 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 194.3/194.3 kB 21.3 MB/s eta 0:00:00
Requirement already satisfied: cryptography>=2.5 in /usr/local/lib/python3.10/dist-packages (from azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague) (42.0.7)
Collecting msal>=1.24.0 (from azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading msal-1.28.0-py3-none-any.whl (102 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 102.2/102.2 kB 15.8 MB/s eta 0:00:00
Collecting msal-extensions>=0.3.0 (from azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading msal_extensions-1.1.0-py3-none-any.whl (19 kB)
Requirement already satisfied: babel>=2.11.0 in /usr/local/lib/python3.10/dist-packages (from courlan>=1.1.0->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague) (2.15.0)
Collecting tld>=0.13 (from courlan>=1.1.0->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading tld-0.13-py2.py3-none-any.whl (263 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 263.8/263.8 kB 34.6 MB/s eta 0:00:00
Collecting marshmallow<4.0.0,>=3.18.0 (from dataclasses-json<0.7,>=0.5.7->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading marshmallow-3.21.3-py3-none-any.whl (49 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.2/49.2 kB 7.6 MB/s eta 0:00:00
Collecting dateparser>=1.1.2 (from htmldate>=1.8.1->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading dateparser-1.2.0-py2.py3-none-any.whl (294 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 295.0/295.0 kB 38.8 MB/s eta 0:00:00
Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from htmldate>=1.8.1->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague) (2.8.2)
Requirement already satisfied: anyio in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.7.1)
Collecting httpcore==1.* (from httpx>=0.24.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading httpcore-1.0.5-py3-none-any.whl (77 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 77.9/77.9 kB 6.8 MB/s eta 0:00:00
Requirement already satisfied: idna in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.7)
Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from httpx>=0.24.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (1.3.1)
Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx>=0.24.1->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading h11-0.14.0-py3-none-any.whl (58 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.3/58.3 kB 8.1 MB/s eta 0:00:00
Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.19.3->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.14.0)
Requirement already satisfied: parso<0.9.0,>=0.8.3 in /usr/local/lib/python3.10/dist-packages (from jedi>=0.16->ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (0.8.4)
Requirement already satisfied: lxml[html_clean]>=4.4.2 in /usr/local/lib/python3.10/dist-packages (from justext>=3.0.1->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague) (4.9.4)
Collecting jsonpatch<2.0,>=1.33 (from langchain-core<0.2.0,>=0.1.52->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading jsonpatch-1.33-py2.py3-none-any.whl (12 kB)
Collecting packaging (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading packaging-23.2-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.0/53.0 kB 7.6 MB/s eta 0:00:00
Requirement already satisfied: beautifulsoup4<5.0.0,>=4.12.3 in /usr/local/lib/python3.10/dist-packages (from llama-index-readers-file<0.2.0,>=0.1.4->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (4.12.3)
Collecting pypdf<5.0.0,>=4.0.1 (from llama-index-readers-file<0.2.0,>=0.1.4->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading pypdf-4.2.0-py3-none-any.whl (290 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 290.4/290.4 kB 36.2 MB/s eta 0:00:00
Collecting striprtf<0.0.27,>=0.0.26 (from llama-index-readers-file<0.2.0,>=0.1.4->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading striprtf-0.0.26-py3-none-any.whl (6.9 kB)
Collecting llama-parse<0.5.0,>=0.4.0 (from llama-index-readers-llama-parse<0.2.0,>=0.1.2->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading llama_parse-0.4.4-py3-none-any.whl (8.0 kB)
Requirement already satisfied: contourpy>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (1.2.1)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (4.53.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in /usr/local/lib/python3.10/dist-packages (from matplotlib~=3.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.1.2)
Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2023.4)
Requirement already satisfied: tzdata>=2022.1 in /usr/local/lib/python3.10/dist-packages (from pandas<3.0,>=1.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2024.1)
Requirement already satisfied: ptyprocess>=0.5 in /usr/local/lib/python3.10/dist-packages (from pexpect>4.3->ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (0.7.0)
Requirement already satisfied: wcwidth in /usr/local/lib/python3.10/dist-packages (from prompt-toolkit!=3.0.0,!=3.0.1,<3.1.0,>=2.0.0->ipython<8.0.0,>=7.34.0->lavague-core<0.3.0,>=0.2.11->lavague) (0.2.13)
Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.7.0)
Requirement already satisfied: pydantic-core==2.18.4 in /usr/local/lib/python3.10/dist-packages (from pydantic>=2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2.18.4)
Requirement already satisfied: greenlet!=0.4.17 in /usr/local/lib/python3.10/dist-packages (from SQLAlchemy<3,>=1.4->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague) (3.0.3)
Requirement already satisfied: sortedcontainers in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague) (2.4.0)
Collecting outcome (from trio~=0.17->selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague)
Downloading outcome-1.3.0.post0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from trio~=0.17->selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague) (1.2.1)
Collecting wsproto>=0.14 (from trio-websocket~=0.9->selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague)
Downloading wsproto-1.2.0-py3-none-any.whl (24 kB)
Requirement already satisfied: click<9.0.0,>=7.1.1 in /usr/local/lib/python3.10/dist-packages (from typer[all]<1.0,>=0.9->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (8.1.7)
Collecting colorama<0.5.0,>=0.4.3 (from typer[all]<1.0,>=0.9->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Collecting shellingham<2.0.0,>=1.3.0 (from typer[all]<1.0,>=0.9->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading shellingham-1.5.4-py2.py3-none-any.whl (9.8 kB)
Requirement already satisfied: rich<14.0.0,>=10.11.0 in /usr/local/lib/python3.10/dist-packages (from typer[all]<1.0,>=0.9->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (13.7.1)
Requirement already satisfied: pysocks!=1.5.7,<2.0,>=1.5.6 in /usr/local/lib/python3.10/dist-packages (from urllib3[socks]<3,>=1.26->selenium<5.0.0,>=4.18.1->lavague-drivers-selenium<0.3.0,>=0.2.2->lavague) (1.7.1)
Collecting starlette<0.38.0,>=0.37.2 (from fastapi->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading starlette-0.37.2-py3-none-any.whl (71 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 71.9/71.9 kB 9.8 MB/s eta 0:00:00
Collecting fastapi-cli>=0.0.2 (from fastapi->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading fastapi_cli-0.0.4-py3-none-any.whl (9.5 kB)
Collecting ujson!=4.0.2,!=4.1.0,!=4.2.0,!=4.3.0,!=5.0.0,!=5.1.0,>=4.0.1 (from fastapi->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading ujson-5.10.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.6/53.6 kB 8.5 MB/s eta 0:00:00
Collecting email_validator>=2.0.0 (from fastapi->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading email_validator-2.1.1-py3-none-any.whl (30 kB)
Requirement already satisfied: six>=1.11.0 in /usr/local/lib/python3.10/dist-packages (from azure-core>=1.23.0->azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague) (1.16.0)
Requirement already satisfied: soupsieve>1.2 in /usr/local/lib/python3.10/dist-packages (from beautifulsoup4<5.0.0,>=4.12.3->llama-index-readers-file<0.2.0,>=0.1.4->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (2.5)
Requirement already satisfied: cffi>=1.12 in /usr/local/lib/python3.10/dist-packages (from cryptography>=2.5->azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague) (1.16.0)
Requirement already satisfied: regex!=2019.02.19,!=2021.8.27 in /usr/local/lib/python3.10/dist-packages (from dateparser>=1.1.2->htmldate>=1.8.1->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague) (2024.5.15)
Requirement already satisfied: tzlocal in /usr/local/lib/python3.10/dist-packages (from dateparser>=1.1.2->htmldate>=1.8.1->trafilatura<2.0.0,>=1.9.0->lavague-core<0.3.0,>=0.2.11->lavague) (5.2)
Collecting dnspython>=2.0.0 (from email_validator>=2.0.0->fastapi->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading dnspython-2.6.1-py3-none-any.whl (307 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 307.7/307.7 kB 38.6 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of fastapi-cli to determine which version is compatible with other requirements. This could take a while.
Collecting fastapi-cli>=0.0.2 (from fastapi->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading fastapi_cli-0.0.3-py3-none-any.whl (9.2 kB)
Downloading fastapi_cli-0.0.2-py3-none-any.whl (9.1 kB)
Collecting fastapi (from gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague)
Downloading fastapi-0.110.3-py3-none-any.whl (91 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 91.8/91.8 kB 12.1 MB/s eta 0:00:00
Collecting jsonpointer>=1.9 (from jsonpatch<2.0,>=1.33->langchain-core<0.2.0,>=0.1.52->langchain<0.2.0,>=0.1.20->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading jsonpointer-2.4-py2.py3-none-any.whl (7.8 kB)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (2023.12.1)
Requirement already satisfied: referencing>=0.28.4 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.35.1)
Requirement already satisfied: rpds-py>=0.7.1 in /usr/local/lib/python3.10/dist-packages (from jsonschema>=3.0->altair<6.0,>=4.2.0->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.18.1)
WARNING: lxml 4.9.4 does not provide the extra 'html_clean'
INFO: pip is looking at multiple versions of lxml[html-clean] to determine which version is compatible with other requirements. This could take a while.
Requirement already satisfied: PyJWT[crypto]<3,>=1.0.0 in /usr/lib/python3/dist-packages (from msal>=1.24.0->azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague) (2.3.0)
Collecting portalocker<3,>=1.0 (from msal-extensions>=0.3.0->azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague)
Downloading portalocker-2.8.2-py3-none-any.whl (17 kB)
Requirement already satisfied: joblib in /usr/local/lib/python3.10/dist-packages (from nltk<4.0.0,>=3.8.1->llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (1.4.2)
Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai>=1.1.0->llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague) (1.7.0)
Requirement already satisfied: markdown-it-py>=2.2.0 in /usr/local/lib/python3.10/dist-packages (from rich<14.0.0,>=10.11.0->typer[all]<1.0,>=0.9->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (3.0.0)
Collecting mypy-extensions>=0.3.0 (from typing-inspect>=0.8.0->llama-index-core==0.10.43->llama-index<0.11.0,>=0.10.19->lavague-core<0.3.0,>=0.2.11->lavague)
Downloading mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.12->cryptography>=2.5->azure-identity<2.0.0,>=1.15.0->llama-index-llms-azure-openai<0.2.0,>=0.1.8->lavague-contexts-openai<0.3.0,>=0.2.0->lavague) (2.22)
Requirement already satisfied: mdurl~=0.1 in /usr/local/lib/python3.10/dist-packages (from markdown-it-py>=2.2.0->rich<14.0.0,>=10.11.0->typer[all]<1.0,>=0.9->gradio==4.26.0->lavague-gradio<0.3.0,>=0.2.1->lavague) (0.1.2)
Building wheels for collected packages: ffmpy
Building wheel for ffmpy (setup.py) ... done
Created wheel for ffmpy: filename=ffmpy-0.3.2-py3-none-any.whl size=5584 sha256=550e902f104e549280c8d85d9150c0d63fdaa46a19bb90d32f1cdcfdd74265a6
Stored in directory: /root/.cache/pip/wheels/bd/65/9a/671fc6dcde07d4418df0c592f8df512b26d7a0029c2a23dd81
Successfully built ffmpy
Installing collected packages: striprtf, pydub, ffmpy, dirtyjson, websockets, tomlkit, tld, shellingham, semantic-version, ruff, rank-bm25, python-multipart, pypdf, portalocker, packaging, outcome, orjson, mypy-extensions, lxml, jsonpointer, jedi, h11, deprecated, colorama, aiofiles, wsproto, uvicorn, typing-inspect, trio, tiktoken, starlette, marshmallow, lxml-html-clean, jsonpatch, httpcore, dateparser, courlan, azure-core, trio-websocket, langsmith, httpx, htmldate, fastapi, dataclasses-json, selenium, openai, msal, llamaindex-py-client, langchain-core, justext, gradio-client, trafilatura, msal-extensions, llama-index-legacy, llama-index-core, langchain-text-splitters, langchain-community, gradio, llama-parse, llama-index-retrievers-bm25, llama-index-readers-file, llama-index-llms-openai, llama-index-indices-managed-llama-cloud, llama-index-embeddings-openai, langchain, azure-identity, llama-index-readers-llama-parse, llama-index-multi-modal-llms-openai, llama-index-llms-azure-openai, llama-index-cli, llama-index-agent-openai, llama-index-program-openai, llama-index-multi-modal-llms-azure-openai, llama-index-question-gen-openai, llama-index, lavague-core, lavague-gradio, lavague-drivers-selenium, lavague-contexts-openai, lavague
Attempting uninstall: packaging
Found existing installation: packaging 24.0
Uninstalling packaging-24.0:
Successfully uninstalled packaging-24.0
Attempting uninstall: lxml
Found existing installation: lxml 4.9.4
Uninstalling lxml-4.9.4:
Successfully uninstalled lxml-4.9.4
Successfully installed aiofiles-23.2.1 azure-core-1.30.2 azure-identity-1.16.0 colorama-0.4.6 courlan-1.2.0 dataclasses-json-0.6.6 dateparser-1.2.0 deprecated-1.2.14 dirtyjson-1.0.8 fastapi-0.110.3 ffmpy-0.3.2 gradio-4.26.0 gradio-client-0.15.1 h11-0.14.0 htmldate-1.8.1 httpcore-1.0.5 httpx-0.27.0 jedi-0.19.1 jsonpatch-1.33 jsonpointer-2.4 justext-3.0.1 langchain-0.1.20 langchain-community-0.0.38 langchain-core-0.1.52 langchain-text-splitters-0.0.2 langsmith-0.1.75 lavague-1.1.2 lavague-contexts-openai-0.2.0 lavague-core-0.2.12 lavague-drivers-selenium-0.2.2.post2 lavague-gradio-0.2.2 llama-index-0.10.43 llama-index-agent-openai-0.2.7 llama-index-cli-0.1.12 llama-index-core-0.10.43 llama-index-embeddings-openai-0.1.10 llama-index-indices-managed-llama-cloud-0.1.6 llama-index-legacy-0.9.48 llama-index-llms-azure-openai-0.1.8 llama-index-llms-openai-0.1.22 llama-index-multi-modal-llms-azure-openai-0.1.4 llama-index-multi-modal-llms-openai-0.1.6 llama-index-program-openai-0.1.6 llama-index-question-gen-openai-0.1.3 llama-index-readers-file-0.1.23 llama-index-readers-llama-parse-0.1.4 llama-index-retrievers-bm25-0.1.3 llama-parse-0.4.4 llamaindex-py-client-0.1.19 lxml-5.2.2 lxml-html-clean-0.1.1 marshmallow-3.21.3 msal-1.28.0 msal-extensions-1.1.0 mypy-extensions-1.0.0 openai-1.32.0 orjson-3.10.3 outcome-1.3.0.post0 packaging-23.2 portalocker-2.8.2 pydub-0.25.1 pypdf-4.2.0 python-multipart-0.0.9 rank-bm25-0.2.2 ruff-0.4.8 selenium-4.21.0 semantic-version-2.10.0 shellingham-1.5.4 starlette-0.37.2 striprtf-0.0.26 tiktoken-0.7.0 tld-0.13 tomlkit-0.12.0 trafilatura-1.10.0 trio-0.25.1 trio-websocket-0.11.1 typing-inspect-0.9.0 uvicorn-0.30.1 websockets-11.0.3 wsproto-1.2.0
Getting logs for Web Agent¶
In [2]:
Copied!
from lavague.drivers.selenium import SeleniumDriver
from lavague.core import ActionEngine, WorldModel
from lavague.core.agents import WebAgent
selenium_driver = SeleniumDriver(headless=True)
action_engine = ActionEngine(selenium_driver)
world_model = WorldModel()
agent = WebAgent(world_model, action_engine)
agent.get("https://huggingface.co/")
agent.run("Go to the first Model in the Models section")
# Retrieve pandas DataFrame with logs
df_logs = agent.logger.return_pandas()
from lavague.drivers.selenium import SeleniumDriver
from lavague.core import ActionEngine, WorldModel
from lavague.core.agents import WebAgent
selenium_driver = SeleniumDriver(headless=True)
action_engine = ActionEngine(selenium_driver)
world_model = WorldModel()
agent = WebAgent(world_model, action_engine)
agent.get("https://huggingface.co/")
agent.run("Go to the first Model in the Models section")
# Retrieve pandas DataFrame with logs
df_logs = agent.logger.return_pandas()
/usr/local/lib/python3.10/dist-packages/lavague/core/__init__.py:18: UserWarning: Telemetry is turned on. To turn off telemetry, set your LAVAGUE_TELEMETRY to 'NONE' warnings.warn(warning_message, UserWarning) /usr/local/lib/python3.10/dist-packages/lavague/core/__init__.py:23: UserWarning: Security warning: This package executes LLM-generated code. Consider using this package in a sandboxed environment. warnings.warn(warning_message, UserWarning) 2024-06-07 09:26:22,872 - INFO - Screenshot folder cleared 2024-06-07 09:26:28,486 - INFO - Thoughts: - The current screenshot shows the homepage of Hugging Face, a platform for AI models, datasets, and applications. - The objective is to go to the first model in the Models section. - The Models section is visible on the left side of the screen. - The first model listed in the Models section is "OpenAI GPT-3". Next engine: Navigation Engine Instruction: Click on the 'OpenAI GPT-3' model in the Models section. 2024-06-07 09:26:50,021 - INFO - Thoughts: - The current screenshot shows the page for the model "Codestarl-22B-v0.1" on Hugging Face. - The objective is to go to the first model in the Models section. - The previous instruction was to click on the 'OpenAI GPT-3' model, but it seems we are on a different model page. - The best next step is to navigate back to the Models section to locate the 'OpenAI GPT-3' model. Next engine: Navigation Controls Instruction: BACK 2024-06-07 09:26:57,086 - INFO - Thoughts: - The current screenshot shows the Hugging Face homepage with sections for Models, Spaces, and Datasets. - The objective is to go to the first model in the Models section. - The first model in the Models section is '2Noisy/ChatTTS'. - The best next step is to click on the '2Noisy/ChatTTS' model to navigate to its page. Next engine: Navigation Engine Instruction: Click on the '2Noisy/ChatTTS' model in the Models section. 2024-06-07 09:27:16,192 - INFO - - The current screenshot shows the page for the '2Noisy/ChatTTS' model on Hugging Face. - The objective is to go to the first model in the Models section. - Previous instructions have attempted to navigate to specific models but have not achieved the objective. - The best next step is to navigate back to the Models section and identify the first model. Next engine: Navigation Controls Instruction: BACK 2024-06-07 09:27:23,571 - INFO - Thoughts: - The current screenshots show the Models section on the Hugging Face website. - The objective is to go to the first model in the Models section. - Previous attempts to click on specific models and navigate back were unsuccessful. - The first model listed in the Models section is '2Noisy/ChatTTS'. - The best next step is to click on the '2Noisy/ChatTTS' model. Next engine: Navigation Engine Instruction: Click on the '2Noisy/ChatTTS' model in the Models section. 2024-06-07 09:27:40,841 - INFO - Thoughts: - The current screenshot shows the page for the '2Noisy/ChatTTS' model on Hugging Face. - The objective is to go to the first model in the Models section. - Previous attempts to click on specific models have not achieved the objective. - A new approach should be used to navigate to the first model in the Models section. - The best next step is to go back to the Models section and identify the first model. Next engine: Navigation Controls Instruction: BACK 2024-06-07 09:27:48,891 - INFO - Thoughts: - The current screenshots show the main page of the Models section on Hugging Face. - The objective is to go to the first model in the Models section. - Previous attempts to click on specific models have failed, indicating that the approach might need adjustment. - The first model listed in the Models section is '2Noisy/ChatTTS'. - The best next step is to click on the '2Noisy/ChatTTS' model again, ensuring the correct element is targeted. Next engine: Navigation Engine Instruction: Click on the '2Noisy/ChatTTS' model in the Models section. 2024-06-07 09:28:02,958 - INFO - Thoughts: - The current screenshot shows the page for the '2Noisy/ChatTTS' model on Hugging Face. - The objective is to go to the first model in the Models section. - Previous attempts to click on specific models have been unsuccessful. - A new approach is needed to navigate to the first model in the Models section. - The best next step is to navigate back to the Models section and identify the first model. Next engine: Navigation Controls Instruction: BACK 2024-06-07 09:28:11,150 - INFO - Thoughts: - The current screenshots show the Models section of the Hugging Face website. - The objective is to go to the first model in the Models section. - Previous attempts to click on specific models have failed, indicating that the approach needs to be adjusted. - The first model listed in the Models section is '2Noisy/ChatTTS'. - The best next step is to click on the '2Noisy/ChatTTS' model again, ensuring that the interaction is correctly executed this time. Next engine: Navigation Engine Instruction: Click on the '2Noisy/ChatTTS' model in the Models section. 2024-06-07 09:28:25,878 - INFO - Thoughts: - The current screenshot shows the page for the '2Noisy/ChatTTS' model on Hugging Face. - The objective is to go to the first model in the Models section. - Previous instructions have repeatedly tried to click on the '2Noisy/ChatTTS' model, which is not the first model in the Models section. - A new approach should be used to navigate to the first model in the Models section. - The best next step is to go back to the Models section and identify the first model. Next engine: Navigation Controls Instruction: BACK 2024-06-07 09:28:26,761 - WARNING - Telemetry failed with local variable 't' referenced before assignment
Exploring logs¶
In [3]:
Copied!
# Pandas option to ensure we show all text in column
import pandas as pd
pd.set_option('display.max_colwidth', None)
# Print the code generated for step 0 of our run
step = 0
print(df_logs.at[step, 'code'])
# Pandas option to ensure we show all text in column
import pandas as pd
pd.set_option('display.max_colwidth', None)
# Print the code generated for step 0 of our run
step = 0
print(df_logs.at[step, 'code'])
# Let's think step by step # First, we notice that the query asks us to click on the "OpenAI GPT-3" model in the Models section. # In the provided HTML, we need to identify the section that contains the models. # We need to locate the specific model named "OpenAI GPT-3". # Upon examining the HTML structure, we see that each model is represented by an article element with a specific class. # We need to navigate through the hierarchy to accurately locate the "OpenAI GPT-3" model. # The correct model is located within an article element with a specific class and contains a header with the model name. # Specifically, for "OpenAI GPT-3", there is an article element with a unique class and contains a header with the text "OpenAI GPT-3". # We observe that this article element has the following XPath: # /html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a # Thus, we believe this is the correct element to be interacted with: openai_gpt3_model = driver.find_element(By.XPATH, "/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a") # Then we can click on the model openai_gpt3_model.click()
In [4]:
Copied!
from IPython.display import display
step = 0
image = 0
display(df_logs["screenshots"][step][image])
from IPython.display import display
step = 0
image = 0
display(df_logs["screenshots"][step][image])
In [5]:
Copied!
# Print the World Model thoughts generated for step 0 of our run
step = 0
print(df_logs.at[step, 'world_model_output'])
# Print the World Model thoughts generated for step 0 of our run
step = 0
print(df_logs.at[step, 'world_model_output'])
Thoughts: - The current screenshot shows the homepage of Hugging Face, a platform for AI models, datasets, and applications. - The objective is to go to the first model in the Models section. - The Models section is visible on the left side of the screen. - The first model listed in the Models section is "OpenAI GPT-3". Next engine: Navigation Engine Instruction: Click on the 'OpenAI GPT-3' model in the Models section.
In [6]:
Copied!
# Print the code generated for step 0 of our run
attempt = 0
from IPython.display import display, HTML, Code
# We need to index the engine log at 0 to access further data due to an on-going update from a legacy feature - this index will be removed in the future
sub_instruction = 0
x = 0
for node in df_logs.at[attempt, 'engine_log'][sub_instruction]['retrieved_html']:
print(f"node {x}")
x = x + 1
display(HTML(node)) # Display node as visual element
display(Code(node, language="html")) # Display code
# Print the code generated for step 0 of our run
attempt = 0
from IPython.display import display, HTML, Code
# We need to index the engine log at 0 to access further data due to an on-going update from a legacy feature - this index will be removed in the future
sub_instruction = 0
x = 0
for node in df_logs.at[attempt, 'engine_log'][sub_instruction]['retrieved_html']:
print(f"node {x}")
x = x + 1
display(HTML(node)) # Display node as visual element
display(Code(node, language="html")) # Display code
node 0
Updated
•
3.24k
•
817
stabilityai/stable-audio-open-1.0
<div class="mr-1 flex items-center overflow-hidden whitespace-nowrap text-sm leading-tight text-gray-400" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div">
<span class="truncate" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[1]">Updated
<time datetime="2024-06-04T09:12:30" title="Tue, 04 Jun 2024 09:12:30 GMT" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[1]/time">3 days ago</time></span>
<span class="px-1.5 text-gray-300" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[2]">• </span>
<svg aria-hidden="true" class="flex-none w-3 text-gray-400 mr-0.5" focusable="false" height="1em" role="img" viewbox="0 0 32 32" width="1em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[1]"><path d="M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z" fill="currentColor" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[1]/path"></path></svg>
3.24k
<span class="px-1.5 text-gray-300" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[3]">• </span>
<svg aria-hidden="true" class="flex-none w-3 text-gray-400 mr-1" fill="currentColor" focusable="false" height="1em" preserveaspectratio="xMidYMid meet" role="img" viewbox="0 0 32 32" width="1em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[2]"><path d="M22.45,6a5.47,5.47,0,0,1,3.91,1.64,5.7,5.7,0,0,1,0,8L16,26.13,5.64,15.64a5.7,5.7,0,0,1,0-8,5.48,5.48,0,0,1,7.82,0L16,10.24l2.53-2.58A5.44,5.44,0,0,1,22.45,6m0-2a7.47,7.47,0,0,0-5.34,2.24L16,7.36,14.89,6.24a7.49,7.49,0,0,0-10.68,0,7.72,7.72,0,0,0,0,10.82L16,29,27.79,17.06a7.72,7.72,0,0,0,0-10.82A7.49,7.49,0,0,0,22.45,4Z" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[2]/path"></path></svg>
817
</div></a></article><article class="overview-card-wrapper group/repo white" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]"><a class="block p-2" href="/stabilityai/stable-audio-open-1.0" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]/a"><header class="flex items-center mb-0.5" title="stabilityai/stable-audio-open-1.0" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]/a/header">
<h4 class="text-md truncate font-mono text-black dark:group-hover/repo:text-yellow-500 group-hover/repo:text-indigo-600 text-smd" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]/a/header/h4">stabilityai/stable-audio-open-1.0</h4>
</header>
node 1
Updated
•
3.24k
•
817
stabilityai/stable-audio-open-1.0
<div class="mr-1 flex items-center overflow-hidden whitespace-nowrap text-sm leading-tight text-gray-400" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div">
<span class="truncate" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[1]">Updated
<time datetime="2024-06-04T09:12:30" title="Tue, 04 Jun 2024 09:12:30 GMT" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[1]/time">3 days ago</time></span>
<span class="px-1.5 text-gray-300" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[2]">• </span>
<svg aria-hidden="true" class="flex-none w-3 text-gray-400 mr-0.5" focusable="false" height="1em" role="img" viewbox="0 0 32 32" width="1em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[1]"><path d="M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10l10-10z" fill="currentColor" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[1]/path"></path></svg>
3.24k
<span class="px-1.5 text-gray-300" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/span[3]">• </span>
<svg aria-hidden="true" class="flex-none w-3 text-gray-400 mr-1" fill="currentColor" focusable="false" height="1em" preserveaspectratio="xMidYMid meet" role="img" viewbox="0 0 32 32" width="1em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[2]"><path d="M22.45,6a5.47,5.47,0,0,1,3.91,1.64,5.7,5.7,0,0,1,0,8L16,26.13,5.64,15.64a5.7,5.7,0,0,1,0-8,5.48,5.48,0,0,1,7.82,0L16,10.24l2.53-2.58A5.44,5.44,0,0,1,22.45,6m0-2a7.47,7.47,0,0,0-5.34,2.24L16,7.36,14.89,6.24a7.49,7.49,0,0,0-10.68,0,7.72,7.72,0,0,0,0,10.82L16,29,27.79,17.06a7.72,7.72,0,0,0,0-10.82A7.49,7.49,0,0,0,22.45,4Z" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[2]/a/div/svg[2]/path"></path></svg>
817
</div></a></article><article class="overview-card-wrapper group/repo white" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]"><a class="block p-2" href="/stabilityai/stable-audio-open-1.0" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]/a"><header class="flex items-center mb-0.5" title="stabilityai/stable-audio-open-1.0" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]/a/header">
<h4 class="text-md truncate font-mono text-black dark:group-hover/repo:text-yellow-500 group-hover/repo:text-indigo-600 text-smd" xpath="/html/body/div/main/div[2]/div[2]/div[2]/div/article[3]/a/header/h4">stabilityai/stable-audio-open-1.0</h4>
</header>
node 2
<div class="absolute opacity-60 text-4xl drop-shadow" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[3]/a/div[4]">🍷</div>
<h4 class="z-40 max-w-full truncate text-center font-bold leading-tight text-blue-50 text-md" style="text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.25);" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[3]/a/h4">FineWeb: decanting the web for the finest text data at scale</h4>
</a>
</article><article class="" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]">
<a class="relative z-0 mx-auto flex flex-col items-center justify-center bg-gradient-to-br p-4 filter from-purple-600 to-purple-600 overflow-hidden hover:brightness-110 h-16 rounded-lg" href="/spaces/Doubiiu/tooncrafter" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a"><div class="absolute left-0 top-0 h-24 w-1/2 bg-gradient-to-br from-black/20 via-transparent to-transparent" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[1]"></div>
<div class="absolute right-16 flex flex-wrap content-start gap-1 overflow-hidden hidden" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[2]">
<div class="inline-flex cursor-pointer select-none items-center overflow-hidden font-mono inline-flex items-center rounded border !border-white/5 bg-white/10 leading-tight text-white opacity-80" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[2]/div"><div class="inline-flex items-center px-1 py-0" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[2]/div/div">
Running
<span class="mx-1" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[2]/div/div/span[1]">on </span>
<span class="-skew-x-6 truncate font-bold uppercase" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[2]/div/div/span[2]">Zero</span></div>
</div>
</div>
<div class="absolute flex items-center rounded-xl top-2 right-3.5 text-xs" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[3]"><svg aria-hidden="true" class="mr-1.5 text-white" fill="currentColor" focusable="false" height="1em" preserveaspectratio="xMidYMid meet" role="img" viewbox="0 0 32 32" width="1em" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[3]/svg"><path d="M22.45,6a5.47,5.47,0,0,1,3.91,1.64,5.7,5.7,0,0,1,0,8L16,26.13,5.64,15.64a5.7,5.7,0,0,1,0-8,5.48,5.48,0,0,1,7.82,0L16,10.24l2.53-2.58A5.44,5.44,0,0,1,22.45,6m0-2a7.47,7.47,0,0,0-5.34,2.24L16,7.36,14.89,6.24a7.49,7.49,0,0,0-10.68,0,7.72,7.72,0,0,0,0,10.82L16,29,27.79,17.06a7.72,7.72,0,0,0,0-10.82A7.49,7.49,0,0,0,22.45,4Z" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[3]/svg/path"></path></svg>
<span class="text-white" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[3]/span">342</span></div>
<div class="absolute opacity-60 text-4xl drop-shadow" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/div[4]">😻</div>
<h4 class="z-40 max-w-full truncate text-center font-bold leading-tight text-blue-50 text-md" style="text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.25);" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[4]/a/h4">ToonCrafter</h4>
</a>
</article><article class="" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[5]">
<a class="relative z-0 mx-auto flex flex-col items-center justify-center bg-gradient-to-br p-4 filter from-pink-600 to-indigo-600 overflow-hidden hover:brightness-110 h-16 rounded-lg" href="/spaces/Dzkaka/ChatTTS" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[5]/a"><div class="absolute left-0 top-0 h-24 w-1/2 bg-gradient-to-br from-black/20 via-transparent to-transparent" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[5]/a/div[1]"></div>
<div class="absolute right-16 flex flex-wrap content-start gap-1 overflow-hidden hidden" xpath="/html/body/div/main/div[2]/div[2]/div[3]/div/article[5]/a/div[2]">
node 3
Build your portfolio
Share your work with the world and build your ML profile.
Accelerate your ML
We provide paid Compute and Enterprise solutions.
Compute
Deploy on optimized Inference Endpoints or update your Spaces applications to a GPU in a few clicks.
View pricing
Starting at $0.60/hour for GPU
<div class="flex justify-between p-6 md:p-8" xpath="/html/body/div/main/div[3]/div[2]/div[4]/div[1]"><div xpath="/html/body/div/main/div[3]/div[2]/div[4]/div[1]/div"><h3 class="text-xl font-semibold 2xl:text-2xl" xpath="/html/body/div/main/div[3]/div[2]/div[4]/div[1]/div/h3">Build your portfolio</h3>
<p class="text-base text-gray-500 2xl:text-lg" xpath="/html/body/div/main/div[3]/div[2]/div[4]/div[1]/div/p">Share your work with the world and build your ML profile.</p></div>
<a class="flex-none self-start rounded-full border border-transparent bg-gray-900 px-2.5 py-1.5 text-smd leading-none text-white hover:border-black hover:bg-white hover:text-black" href="/join" xpath="/html/body/div/main/div[3]/div[2]/div[4]/div[1]/a">Sign Up
</a></div>
<img alt="Younes Belkada Hugging Face profile" class="ml-auto w-full flex-1 overflow-hidden border-t border-gray-100 object-cover object-left-top" src="/front/assets/homepage/younes.svg" xpath="/html/body/div/main/div[3]/div[2]/div[4]/img"/>
<div class="pointer-events-none absolute inset-x-0 bottom-0 h-40 select-none bg-gradient-to-tl from-white/80 to-white/0" xpath="/html/body/div/main/div[3]/div[2]/div[4]/div[2]"></div></div></div>
<div class="flex w-full flex-col items-stretch pb-24 pt-24 text-center" xpath="/html/body/div/main/div[3]/div[3]"><div class="mb-2 flex items-center justify-center gap-2 text-xl font-bold" xpath="/html/body/div/main/div[3]/div[3]/div"><div class="mr-4 h-px flex-1 bg-gradient-to-l from-gray-100 to-white" xpath="/html/body/div/main/div[3]/div[3]/div/div[1]"></div>
<h2 class="text-3xl font-bold 2xl:text-4xl" xpath="/html/body/div/main/div[3]/div[3]/div/h2">Accelerate your ML</h2>
<div class="ml-4 h-px flex-1 bg-gradient-to-r from-gray-100 to-white" xpath="/html/body/div/main/div[3]/div[3]/div/div[2]"></div></div>
<p class="text-lg text-gray-500 2xl:text-xl" style="text-wrap: balance;" xpath="/html/body/div/main/div[3]/div[3]/p">We provide paid Compute and Enterprise solutions.
</p></div>
<div class="mx-auto grid max-w-5xl grid-cols-1 gap-10 2xl:max-w-7xl" xpath="/html/body/div/main/div[3]/div[4]"><div class="col-span-1 grid h-[450px] grid-cols-1 items-center overflow-hidden rounded-xl border bg-white shadow-sm lg:h-[400px] lg:grid-cols-3" xpath="/html/body/div/main/div[3]/div[4]/div[1]"><div class="col-span-1 p-7 md:p-10" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]"><h3 class="mb-4 text-2xl font-semibold" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/h3">Compute</h3>
<p class="mb-6 text-base text-gray-500 lg:mb-8 2xl:text-lg" style="text-wrap: balance;" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/p">Deploy on optimized <a class="underline" href="/pricing#endpoints" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/p/a[1]">Inference Endpoints</a> or update your
<a class="underline" href="/pricing#spaces" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/p/a[2]">Spaces applications</a> to a GPU in a few clicks.
</p>
<div class="flex items-center gap-x-2.5 whitespace-nowrap sm:gap-x-3.5" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/div"><a class="leading-black rounded-lg border border-transparent bg-black px-3.5 py-1 text-base text-white hover:border-black hover:bg-white hover:text-gray-900 2xl:text-lg" href="/pricing" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/div/a">View pricing
</a>
<p class="text-smd text-gray-400 2xl:text-base" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[1]/div/p">Starting at $0.60/hour for GPU</p></div></div>
<div class="col-span-1 self-stretch lg:col-span-2" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[2]"><img alt="Hugging face compute offering" class="pointer-events-none h-full w-full select-none bg-bottom object-cover object-left" src="/front/assets/homepage/compute.svg" xpath="/html/body/div/main/div[3]/div[4]/div[1]/div[2]/img"/></div></div>
Advanced example: Logging lower level modules¶
In [13]:
Copied!
from lavague.drivers.selenium import SeleniumDriver
from lavague.core.logger import AgentLogger
from lavague.core import ActionEngine
selenium_driver = SeleniumDriver(headless=True, url="https://huggingface.co/")
action_engine = ActionEngine(
driver=selenium_driver,
)
# Initialize your logger
logger = AgentLogger()
from lavague.drivers.selenium import SeleniumDriver
from lavague.core.logger import AgentLogger
from lavague.core import ActionEngine
selenium_driver = SeleniumDriver(headless=True, url="https://huggingface.co/")
action_engine = ActionEngine(
driver=selenium_driver,
)
# Initialize your logger
logger = AgentLogger()
In [14]:
Copied!
# Start a new logging run
logger.new_run()
# Add logging to NavigationEngine
action_engine.navigation_engine.set_logger(logger)
obs = selenium_driver.get_obs()
# Start a new logging run
logger.new_run()
# Add logging to NavigationEngine
action_engine.navigation_engine.set_logger(logger)
obs = selenium_driver.get_obs()
In [15]:
Copied!
# Engine & instruction
engine_name = "Navigation Engine"
instruction = "Show me the top model"
# Execute the instruction
ret = action_engine.dispatch_instruction(engine_name, instruction)
# Add required driver info to logs and end the logging step
logger.add_log(obs)
logger.end_step()
# Retrieve and print logs as a pandas DataFrame
df_logs = logger.return_pandas()
# Engine & instruction
engine_name = "Navigation Engine"
instruction = "Show me the top model"
# Execute the instruction
ret = action_engine.dispatch_instruction(engine_name, instruction)
# Add required driver info to logs and end the logging step
logger.add_log(obs)
logger.end_step()
# Retrieve and print logs as a pandas DataFrame
df_logs = logger.return_pandas()