File size: 811 Bytes
20f7a04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import requests
import os

# أنشئ مجلد لحفظ الملفات إذا أردت
os.makedirs("darkgpt_files", exist_ok=True)

# قائمة الملفات التي نريد تحميلها
files = [
    "app.py",
    "darkgpt.png",
    "requirements.txt",
    "README.md"
]

base_url = "https://huggingface.co/spaces/billibonkers/DarkGPT_1.0_Bonkers/resolve/main/"

for file_name in files:
    url = base_url + file_name
    save_path = os.path.join("darkgpt_files", file_name)
    print(f"Downloading {file_name}...")
    
    response = requests.get(url)
    if response.status_code == 200:
        with open(save_path, "wb") as f:
            f.write(response.content)
        print(f"Saved to {save_path}")
    else:
        print(f"Failed to download {file_name} (status code: {response.status_code})")