File size: 782 Bytes
d345c85
 
 
ed6ab4b
 
 
db05a8a
f7d82d9
db05a8a
 
 
 
 
85b9c34
db05a8a
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import gradio as gr
import os
from langchain_community.document_loaders import PYPDFloader
from langchain.txt_sliter import recursiveCharacterTextSpliter
from langchain_community.vectorstores import chroma
from langchain.chains import ConversationalRetrievalChain
from langchain_community.embeddings import HuggingFaceEmbeddings
from langchain_community.llms import HuggingFacePipeline
from langchain.chains import ConversationalRetrievalChain
from langchain.memory import ConversationBufferMemory
from langchain_community.llms import HuggingFaceEdpoint
from pathlib import path
import chromadb
from unidecode import unidecode
from transformers import Auto Tokenizer
import transformers
import torch
import tqdm
import acceierate
import re
defacult_persist_directry=`./chroma_HF/`