binqiangliu commited on
Commit
cdf6cb1
1 Parent(s): 4303c79

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import dependencies
2
+ import torch
3
+ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, pipeline
4
+
5
+ import os
6
+ import gradio as gr
7
+ #from google.colab import drive
8
+
9
+ import chromadb
10
+ from langchain.llms import HuggingFacePipeline
11
+ from langchain.document_loaders import TextLoader
12
+ from langchain.text_splitter import RecursiveCharacterTextSplitter
13
+ from langchain.embeddings import HuggingFaceEmbeddings
14
+ from langchain.vectorstores import Chroma
15
+ from langchain import HuggingFacePipeline
16
+ from langchain.document_loaders import PyPDFDirectoryLoader
17
+ from langchain.chains import ConversationalRetrievalChain
18
+ from langchain.memory import ConversationBufferMemory
19
+
20
+