devve1 commited on
Commit
37e15e5
1 Parent(s): 1e27ae6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -23
app.py CHANGED
@@ -160,29 +160,8 @@ def main(query: str, client: QdrantClient, collection_name: str, tokenizer: Mist
160
  @st.cache_resource
161
  def load_models_and_documents():
162
  with st.spinner('Load models...'):
163
- model_path = snapshot_download(
164
- repo_id="Ichigo2899/mistralai-Mistral-Nemo-Instruct-2407-AWQ"
165
- )
166
- with tempfile.TemporaryDirectory() as tmpdirname:
167
- snapshot_download(
168
- repo_id='mistralai/Mistral-Nemo-Instruct-2407',
169
- allow_patterns=["params.json", 'tekken.json'],
170
- token=os.getenv('AccessMistralNemo'),
171
- cache_dir=tmpdirname
172
- )
173
- for root, dirs, files in os.walk(tmpdirname):
174
- for file in files:
175
- if file in ["params.json", "tekken.json"]:
176
- dest_path = os.path.join(model_path, file)
177
- if os.path.exists(dest_path):
178
- print(f"{dest_path} already exists, skipping or renaming")
179
- else:
180
- shutil.copy(file, model_path)
181
-
182
- if os.path.exists(f"{model_path}/tekken.json"):
183
- print('EXIST')
184
- else:
185
- print('DOESNT EXIST')
186
  tokenizer = MistralTokenizer.from_file(f"{model_path}/tekken.json")
187
 
188
  llm = vllm.LLM(
 
160
  @st.cache_resource
161
  def load_models_and_documents():
162
  with st.spinner('Load models...'):
163
+ model_path = snapshot_download(repo_id="GameScribes/Mistral-Nemo-AWQ")
164
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
165
  tokenizer = MistralTokenizer.from_file(f"{model_path}/tekken.json")
166
 
167
  llm = vllm.LLM(