Spaces:
Running
Running
File size: 542 Bytes
4de8fd3 57998d7 4de8fd3 57998d7 4de8fd3 57998d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
import streamlit as st
from haystack.nodes.connector import Crawler
from haystack.utils import fetch_archive_from_http, clean_wiki_text, convert_files_to_docs
from haystack.document_stores import InMemoryDocumentStore
from haystack.pipelines import ExtractiveQAPipeline
from haystack.nodes import FARMReader, TfidfRetriever
import validators
import json
doc_dir = './article_txt_got'
document_store = InMemoryDocumentStore()
docs = convert_files_to_docs(dir_path=doc_dir, clean_func=clean_wiki_text, split_paragraphs=True)
st.write(docs[1]) |