Spaces:
Build error
Build error
Commit
•
61f9c80
1
Parent(s):
5ce0e70
Add QWEN 2.5
Browse files
app.py
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
import json
|
2 |
import os
|
3 |
-
import requests
|
4 |
-
import tqdm
|
5 |
|
6 |
import gradio as gr
|
7 |
-
import torch
|
8 |
from distilabel.llms import LlamaCppLLM
|
9 |
from distilabel.steps.tasks.argillalabeller import ArgillaLabeller
|
10 |
|
11 |
-
file_path = os.path.join(os.path.dirname(__file__), "
|
12 |
-
download_url = "https://huggingface.co/
|
13 |
|
14 |
|
15 |
if not os.path.exists(file_path):
|
|
|
|
|
|
|
16 |
response = requests.get(download_url, stream=True)
|
17 |
total_length = int(response.headers.get("content-length"))
|
18 |
|
19 |
with open(file_path, "wb") as f:
|
20 |
for chunk in tqdm.tqdm(
|
21 |
-
response.iter_content(chunk_size=1024),
|
22 |
-
total=total_length,
|
23 |
unit="KB",
|
24 |
unit_scale=True,
|
25 |
):
|
|
|
1 |
import json
|
2 |
import os
|
|
|
|
|
3 |
|
4 |
import gradio as gr
|
|
|
5 |
from distilabel.llms import LlamaCppLLM
|
6 |
from distilabel.steps.tasks.argillalabeller import ArgillaLabeller
|
7 |
|
8 |
+
file_path = os.path.join(os.path.dirname(__file__), "Qwen2-5-0.5B-Instruct-f16.gguf")
|
9 |
+
download_url = "https://huggingface.co/gaianet/Qwen2.5-0.5B-Instruct-GGUF/resolve/main/Qwen2.5-0.5B-Instruct-f16.gguf?download=true"
|
10 |
|
11 |
|
12 |
if not os.path.exists(file_path):
|
13 |
+
import requests
|
14 |
+
import tqdm
|
15 |
+
|
16 |
response = requests.get(download_url, stream=True)
|
17 |
total_length = int(response.headers.get("content-length"))
|
18 |
|
19 |
with open(file_path, "wb") as f:
|
20 |
for chunk in tqdm.tqdm(
|
21 |
+
response.iter_content(chunk_size=1024 * 1024),
|
22 |
+
total=total_length / (1024 * 1024),
|
23 |
unit="KB",
|
24 |
unit_scale=True,
|
25 |
):
|