thomas-yanxin commited on
Commit
d1d2d87
1 Parent(s): 3e92a87

modified: app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,12 +4,13 @@ import gradio as gr
4
  import nltk
5
  import sentence_transformers
6
  import torch
7
- from compress_gpt.langchain import CompressPrompt as PromptTemplate
8
  from duckduckgo_search import ddg
9
  from duckduckgo_search.utils import SESSION
10
  from langchain.chains import RetrievalQA
11
  from langchain.document_loaders import UnstructuredFileLoader
12
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
 
 
13
  from langchain.vectorstores import FAISS
14
 
15
  from chatllm import ChatLLM
@@ -18,6 +19,7 @@ from chinese_text_splitter import ChineseTextSplitter
18
  # os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
19
 
20
 
 
21
  nltk.data.path.append('./nltk_data')
22
 
23
  embedding_model_dict = {
 
4
  import nltk
5
  import sentence_transformers
6
  import torch
 
7
  from duckduckgo_search import ddg
8
  from duckduckgo_search.utils import SESSION
9
  from langchain.chains import RetrievalQA
10
  from langchain.document_loaders import UnstructuredFileLoader
11
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings
12
+ from langchain.prompts import PromptTemplate
13
+ from langchain.prompts.prompt import PromptTemplate
14
  from langchain.vectorstores import FAISS
15
 
16
  from chatllm import ChatLLM
 
19
  # os.system('pip install git+https://github.com/facebookresearch/detectron2.git')
20
 
21
 
22
+
23
  nltk.data.path.append('./nltk_data')
24
 
25
  embedding_model_dict = {