vishwask commited on
Commit
8ef8a1a
·
1 Parent(s): 1eddeb0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -72,7 +72,8 @@ def load_data():
72
  @st.cache_resource
73
  def load_model(_docs):
74
  #embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-large",model_kwargs={"device":DEVICE})
75
- embeddings = HuggingFaceInstructEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2",model_kwargs={"device":DEVICE})
 
76
  print(DEVICE)
77
 
78
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=256)
@@ -86,7 +87,8 @@ def load_model(_docs):
86
  print('db done')
87
 
88
 
89
- model_name_or_path = "TheBloke/Llama-2-13B-chat-GPTQ"
 
90
  model_basename = "model"
91
 
92
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
 
72
  @st.cache_resource
73
  def load_model(_docs):
74
  #embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-large",model_kwargs={"device":DEVICE})
75
+ #embeddings = HuggingFaceInstructEmbeddings(model_name="sentence-transformers/all-MiniLM-L6-v2",model_kwargs={"device":DEVICE})
76
+ embeddings = HuggingFaceInstructEmbeddings(model_name="/home/user/app/all-MiniLM-L6-v2/",model_kwargs={"device":DEVICE})
77
  print(DEVICE)
78
 
79
  text_splitter = RecursiveCharacterTextSplitter(chunk_size=1024, chunk_overlap=256)
 
87
  print('db done')
88
 
89
 
90
+ #model_name_or_path = "TheBloke/Llama-2-13B-chat-GPTQ"
91
+ model_name_or_path = "/home/user/app/Llama-2-13B-chat-GPTQ/"
92
  model_basename = "model"
93
 
94
  tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)