MoiMoi-01 commited on
Commit
92113b9
·
verified ·
1 Parent(s): 7535e35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -3,22 +3,22 @@ import os
3
 
4
  print(os.getcwd())
5
 
6
- # url = "https://huggingface.co/ngxson/DeepSeek-R1-Distill-Qwen-7B-abliterated-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf?download=true"
7
- # file_name = "/chatbot_v2/models/DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf"
8
 
9
- # response = requests.get(url, stream=True)
10
 
11
- # if response.status_code == 200:
12
- # with open(file_name, "wb") as file:
13
- # for chunk in response.iter_content(chunk_size=8192):
14
- # file.write(chunk)
15
- # print("Download complete:", file_name)
16
- # else:
17
- # print("Failed to download. Status code:", response.status_code)
18
 
19
  from llama_cpp import Llama
20
- url = "https://huggingface.co/ngxson/DeepSeek-R1-Distill-Qwen-7B-abliterated-GGUF/DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf"
21
- model_path = url#"https://huggingface.co/ngxson/DeepSeek-R1-Distill-Qwen-7B-abliterated-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf"
22
 
23
  # Load the model directly from URL
24
  llm = Llama(model_path=model_path)
 
3
 
4
  print(os.getcwd())
5
 
6
+ url = "https://huggingface.co/ngxson/DeepSeek-R1-Distill-Qwen-7B-abliterated-GGUF/resolve/main/DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf?download=true"
7
+ file_name = "DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf"
8
 
9
+ response = requests.get(url, stream=True)
10
 
11
+ if response.status_code == 200:
12
+ with open(file_name, "wb") as file:
13
+ for chunk in response.iter_content(chunk_size=8192):
14
+ file.write(chunk)
15
+ print("Download complete:", file_name)
16
+ else:
17
+ print("Failed to download. Status code:", response.status_code)
18
 
19
  from llama_cpp import Llama
20
+ # url = "https://huggingface.co/ngxson/DeepSeek-R1-Distill-Qwen-7B-abliterated-GGUF/DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf"
21
+ model_path = "DeepSeek-R1-Distill-Qwen-7B-abliterated-Q4_K_M.gguf"
22
 
23
  # Load the model directly from URL
24
  llm = Llama(model_path=model_path)