https://github.com/QiuYannnn/Local-File-Organizer
An AI-powered file management tool that ensures privacy by organizing local texts, images. Using Llama3.2 3B and Llava v1.6 models with the Nexa SDK, it intuitively scans, restructures, and organizes files for quick, seamless access and easy retrieval.
https://github.com/QiuYannnn/Local-File-Organizer
file-organizer llama3 llm on-device-ai vlm
Last synced: 13 days ago
JSON representation
An AI-powered file management tool that ensures privacy by organizing local texts, images. Using Llama3.2 3B and Llava v1.6 models with the Nexa SDK, it intuitively scans, restructures, and organizes files for quick, seamless access and easy retrieval.
- Host: GitHub
- URL: https://github.com/QiuYannnn/Local-File-Organizer
- Owner: QiuYannnn
- License: mit
- Created: 2024-09-21T07:55:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-21T22:20:55.000Z (12 months ago)
- Last Synced: 2025-05-28T20:57:16.078Z (5 months ago)
- Topics: file-organizer, llama3, llm, on-device-ai, vlm
- Language: Python
- Homepage:
- Size: 27.2 MB
- Stars: 2,323
- Watchers: 38
- Forks: 199
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-useful-projects - <img src="https://icon.horse/icon/github.com" height="20px" align="center"/>/QiuYannnn/Local-File-Organizer - AI file organizer (Other / Other)
- jimsghstars - QiuYannnn/Local-File-Organizer - An AI-powered file management tool that ensures privacy by organizing local texts, images. Using Llama3.2 3B and Llava v1.6 models with the Nexa SDK, it intuitively scans, restructures, and organizes (Python)
- StarryDivineSky - QiuYannnn/Local-File-Organizer - File-Organizer是一个AI驱动的本地文件管理工具,注重用户隐私。它使用Llama3.2 3B和Llava v1.6模型,并结合Nexa SDK,智能地扫描、重构和组织本地文本和图像文件。该工具旨在提供快速、无缝的文件访问和便捷的检索体验。其核心功能包括文件扫描、文件重构和文件组织。通过AI技术,项目能够理解文件内容,并根据内容进行智能分类和整理。该项目的主要特色在于其AI驱动的文件管理能力和对用户隐私的保护。用户可以更轻松地管理和查找本地文件,提高工作效率。 (A01_文本生成_文本对话 / 大语言对话模型及数据)
README
# Local File Organizer: AI File Management Run Entirely on Your Device, Privacy Assured
Tired of digital clutter? Overwhelmed by disorganized files scattered across your computer? Let AI do the heavy lifting! The Local File Organizer is your personal organizing assistant, using cutting-edge AI to bring order to your file chaos - all while respecting your privacy.
## How It Works 💡
Before:
```
/home/user/messy_documents/
├── IMG_20230515_140322.jpg
├── IMG_20230516_083045.jpg
├── IMG_20230517_192130.jpg
├── budget_2023.xlsx
├── meeting_notes_05152023.txt
├── project_proposal_draft.docx
├── random_thoughts.txt
├── recipe_chocolate_cake.pdf
├── scan0001.pdf
├── vacation_itinerary.docx
└── work_presentation.pptx0 directories, 11 files
```After:
```
/home/user/organized_documents/
├── Financial
│ └── 2023_Budget_Spreadsheet.xlsx
├── Food_and_Recipes
│ └── Chocolate_Cake_Recipe.pdf
├── Meetings_and_Notes
│ └── Team_Meeting_Notes_May_15_2023.txt
├── Personal
│ └── Random_Thoughts_and_Ideas.txt
├── Photos
│ ├── Cityscape_Sunset_May_17_2023.jpg
│ ├── Morning_Coffee_Shop_May_16_2023.jpg
│ └── Office_Team_Lunch_May_15_2023.jpg
├── Travel
│ └── Summer_Vacation_Itinerary_2023.docx
└── Work
├── Project_X_Proposal_Draft.docx
├── Quarterly_Sales_Report.pdf
└── Marketing_Strategy_Presentation.pptx7 directories, 11 files
```## Updates 🚀
**[2024/09] v0.0.2**:
* Featured by [Nexa Gallery](https://nexaai.com/gallery) and [Nexa SDK Cookbook](https://github.com/NexaAI/nexa-sdk/tree/main/examples)!
* Dry Run Mode: check sorting results before committing changes
* Silent Mode: save all logs to a txt file for quieter operation
* Added file support: `.md`, .`excel`, `.ppt`, and `.csv`
* Three sorting options: by content, by date, and by type
* The default text model is now [Llama3.2 3B](https://nexaai.com/meta/Llama3.2-3B-Instruct/gguf-q3_K_M/file)
* Improved CLI interaction experience
* Added real-time progress bar for file analysisPlease update the project by deleting the original project folder and reinstalling the requirements. Refer to the installation guide from Step 4.
## Roadmap 📅
- [ ] Copilot Mode: chat with AI to tell AI how you want to sort the file (ie. read and rename all the PDFs)
- [ ] Change models with CLI
- [ ] ebook format support
- [ ] audio file support
- [ ] video file support
- [ ] Implement best practices like Johnny Decimal
- [ ] Check file duplication
- [ ] Dockerfile for easier installation
- [ ] People from [Nexa](https://github.com/NexaAI/nexa-sdk) is helping me to make executables for macOS, Linux and Windows## What It Does 🔍
This intelligent file organizer harnesses the power of advanced AI models, including language models (LMs) and vision-language models (VLMs), to automate the process of organizing files by:
* Scanning a specified input directory for files.
* Content Understanding:
- **Textual Analysis**: Uses the [Llama3.2 3B](https://nexaai.com/meta/Llama3.2-3B-Instruct/gguf-q3_K_M/file) to analyze and summarize text-based content, generating relevant descriptions and filenames.
- **Visual Content Analysis**: Uses the [LLaVA-v1.6](https://nexaai.com/liuhaotian/llava-v1.6-vicuna-7b/gguf-q4_0/file) , based on Vicuna-7B, to interpret visual files such as images, providing context-aware categorization and descriptions.* Understanding the content of your files (text, images, and more) to generate relevant descriptions, folder names, and filenames.
* Organizing the files into a new directory structure based on the generated metadata.The best part? All AI processing happens 100% on your local device using the [Nexa SDK](https://github.com/NexaAI/nexa-sdk). No internet connection required, no data leaves your computer, and no AI API is needed - keeping your files completely private and secure.
## Supported File Types 📁
- **Images:** `.png`, `.jpg`, `.jpeg`, `.gif`, `.bmp`
- **Text Files:** `.txt`, `.docx`, `.md`
- **Spreadsheets:** `.xlsx`, `.csv`
- **Presentations:** `.ppt`, `.pptx`
- **PDFs:** `.pdf`## Prerequisites 💻
- **Operating System:** Compatible with Windows, macOS, and Linux.
- **Python Version:** Python 3.12
- **Conda:** Anaconda or Miniconda installed.
- **Git:** For cloning the repository (or you can download the code as a ZIP file).## Installation 🛠
> For SDK installation and model-related issues, please post on [here](https://github.com/NexaAI/nexa-sdk/issues).
### 1. Install Python
Before installing the Local File Organizer, make sure you have Python installed on your system. We recommend using Python 3.12 or later.
You can download Python from [the official website]((https://www.python.org/downloads/)).
Follow the installation instructions for your operating system.
### 2. Clone the Repository
Clone this repository to your local machine using Git:
```zsh
git clone https://github.com/QiuYannnn/Local-File-Organizer.git
```Or download the repository as a ZIP file and extract it to your desired location.
### 3. Set Up the Python Environment
Create a new Conda environment named `local_file_organizer` with Python 3.12:
```zsh
conda create --name local_file_organizer python=3.12
```Activate the environment:
```zsh
conda activate local_file_organizer
```### 4. Install Nexa SDK ️
#### CPU Installation
To install the CPU version of Nexa SDK, run:
```bash
pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/cpu --extra-index-url https://pypi.org/simple --no-cache-dir
```#### GPU Installation (Metal - macOS)
For the GPU version supporting Metal (macOS), run:
```bash
CMAKE_ARGS="-DGGML_METAL=ON -DSD_METAL=ON" pip install nexaai --prefer-binary --index-url https://nexaai.github.io/nexa-sdk/whl/metal --extra-index-url https://pypi.org/simple --no-cache-dir
```
For detailed installation instructions of Nexa SDK for **CUDA** and **AMD GPU** support, please refer to the [Installation section](https://github.com/NexaAI/nexa-sdk?tab=readme-ov-file#installation) in the main README.### 5. Install Dependencies
1. Ensure you are in the project directory:
```zsh
cd path/to/Local-File-Organizer
```
Replace `path/to/Local-File-Organizer` with the actual path where you cloned or extracted the project.2. Install the required dependencies:
```zsh
pip install -r requirements.txt
```**Note:** If you encounter issues with any packages, install them individually:
```zsh
pip install nexa Pillow pytesseract PyMuPDF python-docx
```With the environment activated and dependencies installed, run the script using:
### 6. Running the Script🎉
```zsh
python main.py
```## Notes
- **SDK Models:**
- The script uses `NexaVLMInference` and `NexaTextInference` models [usage](https://docs.nexaai.com/sdk/python-interface/gguf).
- Ensure you have access to these models and they are correctly set up.
- You may need to download model files or configure paths.- **Dependencies:**
- **pytesseract:** Requires Tesseract OCR installed on your system.
- **macOS:** `brew install tesseract`
- **Ubuntu/Linux:** `sudo apt-get install tesseract-ocr`
- **Windows:** Download from [Tesseract OCR Windows Installer](https://github.com/UB-Mannheim/tesseract/wiki)
- **PyMuPDF (fitz):** Used for reading PDFs.- **Processing Time:**
- Processing may take time depending on the number and size of files.
- The script uses multiprocessing to improve performance.- **Customizing Prompts:**
- You can adjust prompts in `data_processing.py` to change how metadata is generated.## License
This project is dual-licensed under the MIT License and Apache 2.0 License. You may choose which license you prefer to use for this project.
- See the [MIT License](LICENSE-MIT) for more details.