A user-friendly desktop application for backing up your Hugging Face models, datasets, and spaces. Originally developed as a long standing Jupyter notebook for ease of use for everyone.
Access the original Notebook here!
This tool provides a graphical user interface (GUI) to simplify backing up your local machine's files to the Hugging Face Hub. It's designed to be a more intuitive alternative to using the command-line interface (CLI).
- Upload Files and Folders: Easily back up your local models, datasets, and spaces to the Hugging Face Hub.
- Manage Repositories: Organize your backups into different repositories.
- Configure Settings: Configure your API token, proxy settings, and rate limit delay, all within the application.
Why use this tool instead of the command line?
The Hugging Face Hub CLI is powerful, but it can be intimidating for users unfamiliar with the command line. This tool offers a more visual and intuitive approach to managing your Hugging Face backups, making it more accessible.
Here's a quick overview of what you can do with the Hugging Face Backup Tool:
- Hugging Face Uploader: Upload files and entire folders to the Hugging Face Hub.
- Zip Folder: Create ZIP archives of your local folders for backup.
- Download: Download files from the Hugging Face Hub.
- Material Themes: Customize the application's appearance with a variety of beautiful Qt Material themes.
This section guides you through installing and setting up the tool. It requires Python 3.10 or higher.
The Hugging Face Backup Tool is built using PyQt6, a cross-platform GUI framework. This means it should be compatible with the following operating systems:
- Windows: Windows 10 or later (64-bit)
- macOS: macOS 10.14 (Mojave) or later
- Linux: Most modern Linux distributions (e.g., Ubuntu, Fedora, Debian)
Important Note: While the tool should work on these operating systems, it has only been tested on [MacOS Ventura 13.5.1]. Your experience may vary. Please report any compatibility issues you encounter!
Here are the general steps for installing the tool.
Steps:
-
Install Python: Make sure you have Python 3.10 or higher installed. You can download it from the official Python website (https://www.python.org/downloads/) or your operating system's package manager.
- Windows: During installation, make sure to check the box "Add Python to PATH".
- Linux: Use your distribution's package manager (e.g.,
sudo apt install python3on Debian/Ubuntu,sudo dnf install python3on Fedora/CentOS/RHEL). - macOS: You may install with Homebrew (
brew install [email protected]) but you may also install from the website.
If you're interested in using a friendlier shell for your terminal please check out FISH.
-
Clone the Repository: Open a terminal or command prompt and clone the repository:
git clone https://github.com/Ktiseos-Nyx/Huggingface-Desktop cd Huggingface-DesktopTo Install the specific branch of Refactoring please use
git clone -b refactoring --single-branch https://github.com/Ktiseos-Nyx/Huggingface-Desktop.git cd Huggingface-Desktop -
Create a Virtual Environment (Recommended): It's best practice to use a virtual environment. This isolates the project's dependencies.
python -m venv venv
-
Activate the Virtual Environment:
-
Windows:
venv\Scripts\activate
-
Linux/macOS (Bash/Zsh):
source venv/bin/activate -
FISH:
source venv/bin/activate.fish
-
-
Install Dependencies: Install the required Python packages using
pip:pip install -r requirements.txt
-
Run the Application:
python launch.py
Before using the tool, you need to configure it with your Hugging Face API token.
Steps:
- Get an API Token: If you don't have one, create a Hugging Face API token with "write" access. You can do this in your Hugging Face account settings: (https://huggingface.co/settings/tokens).
- Open the Configuration Dialog: Click the "Edit Config (API Token)" button within the application.
- Enter Your Token: Paste your API token into the "Hugging Face API Token" field.
- Save the Configuration: Click the "Save" button.
This section lists some of the known limitations and areas for improvement.
- Spacing and UI Glitches: There might still be some spacing or UI layout issues.
- General Code Challenges: Developing on macOS can be tricky, and there are still some things we're going to work on in future.
Here's how to use the Hugging Face Backup Tool:
Steps for the Uploader:
- Select a Directory: Click the "Select Directory" button, and choose the directory containing the files you want to back up.
- Choose a File Type: Use the "File Type" dropdown to select the type of files you want to upload (e.g., SafeTensors, PyTorch Models).
- Select Files: The file list will populate. Select the files to upload.
- Enter Repository Information: Fill in the "Owner" (your organization or username) and "Repository" name.
- Click "Upload": Start the upload process.
- Check Output: Check the output window in the GUI for progress updates.
Steps for the Zip Folder:
Steps for the Downloader:
Contributions are very welcome! If you'd like to contribute, please:
- Submit pull requests with your improvements or bug fixes.
- Open issues to report bugs, request features, or suggest improvements.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
GNU General Public License v3.0: (https://www.gnu.org/licenses/gpl-3.0.en.html).
- Looking to refactor again later on and add "support" for easy tabbable plugins, like a metadata reader.
- Porting this to gradio for an easier online use.
- Refactoring the original Jupyter to have similar features.
