This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from time import sleep | |
from pprint import pprint | |
import requests | |
from pathlib import Path | |
from haystack.document_stores.elasticsearch import ElasticsearchDocumentStore | |
from haystack.utils import launch_es | |
from haystack.nodes import DensePassageRetriever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
from typing import TYPE_CHECKING, Union, List, Optional, Dict, Any, Tuple | |
import os | |
import hashlib | |
from pathlib import Path | |
from dataclasses import asdict | |
if not TYPE_CHECKING: | |
from pydantic.dataclasses import dataclass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://colab.research.google.com/drive/12jGo_tm2bAD7NRiqxvF-XfKfEWgKIx4X#scrollTo=sDL9EihTwBaC&uniqifier=1 | |
# pip install lxml aiohttp asyncio nest_asyncio aiofiles | |
import shutil | |
from lxml import etree | |
from lxml import html | |
import aiohttp | |
import asyncio | |
import aiofiles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import os | |
import logging | |
import wikipedia | |
OUTPUT_DIR = Path(__file__).parent / "animals" | |
LIST_FILE = Path(__file__).parent / "list_of_zoo_animals.txt" | |
OVERWRITE_EXISTING = False | |
with open(LIST_FILE, 'r') as list_file: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer