Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,22 +3,22 @@ import os
|
|
3 |
|
4 |
print(os.getcwd())
|
5 |
|
6 |
-
|
7 |
-
|
8 |
|
9 |
-
|
10 |
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
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 =
|
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)
|