DBMe commited on
Commit
8ae4aec
1 Parent(s): a2505f7

Delete upload.py

Browse files
Files changed (1) hide show
  1. upload.py +0 -45
upload.py DELETED
@@ -1,45 +0,0 @@
1
- from huggingface_hub import HfApi
2
- from pathlib import Path
3
-
4
- # Define the parameters for uploading
5
- repo_id = "DBMe/Midnight-Miqu-103B-v1.0-3.53bpw-h6-exl2" # Replace with your actual repo ID
6
- folder_path = "/home/asusws-x570-ace/programs/tabbyAPI/models/Midnight-Miqu-103B-v1.0_exl2_3.53bpw/" # Replace with your folder path
7
- repo_type = "model" # Change to "model" or "space" if applicable
8
- revision = "main" # Optional: specify the branch or use "main"
9
- private = False # Set to True if the repository should be private
10
- allow_patterns = None # Optional: specify patterns of files to include
11
- ignore_patterns = None # Optional: specify patterns of files to exclude
12
- num_workers = 1 # Set based on your system; lower if your internet is unstable
13
- print_report = True # Enable progress reporting
14
- print_report_every = 60 # Report frequency in seconds
15
-
16
- # Initialize the Hugging Face API client
17
- api = HfApi()
18
-
19
- # Function to upload the folder in a resumable manner
20
- def upload_resumable():
21
- try:
22
- print("Starting upload process...")
23
-
24
- # Perform the upload with the provided parameters
25
- api.upload_large_folder(
26
- repo_id=repo_id,
27
- folder_path=Path(folder_path),
28
- repo_type=repo_type,
29
- revision=revision,
30
- private=private,
31
- allow_patterns=allow_patterns,
32
- ignore_patterns=ignore_patterns,
33
- num_workers=num_workers,
34
- print_report=print_report,
35
- print_report_every=print_report_every,
36
- )
37
-
38
- print("Upload completed successfully!")
39
-
40
- except Exception as e:
41
- print(f"Upload interrupted due to error: {e}")
42
- print("You can resume the upload by running the script again.")
43
-
44
- # Call the function to start the upload
45
- upload_resumable()