AI File Organizer:以本機 AI 整理雜亂檔案
AI File Organizer: Let Local AI Handle the File Clutter
AI File Organizer 是一個以 Python 和 Gemma(透過 Ollama 本機執行)建立的開源學習項目,可按檔案名稱建議分類,並在用戶確認後整理檔案。分類可在本機模型及 Ollama 可用時進行,無需雲端 AI API;用戶可先預覽結果,再決定是否套用。
Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥
Introduction
Have you ever spent time searching through a folder full of documents, images, audio files, and programming files? I wanted to explore a simple way to reduce this repetitive work.
For the Hacktoberfest Open-Source AI Challenge, I am building AI File Organizer, a beginner-friendly Python project that uses a locally running open-weight AI model to classify filenames and help organize files into categories.
The Problem
Manually sorting files takes time, especially when a folder contains many different types of files. I wanted to explore how AI could help automate this repetitive task.
What I Built
AI File Organizer uses Python and Gemma through Ollama to suggest categories for filenames.
The categories include:
- Study
- Images
- Documents
- Videos
- Audio
- Archives
- Code
- Other
The program previews the suggested categories before moving files. The user can review the results and choose whether to apply the changes.
Technology Stack
- Python
- Ollama
- Gemma open-weight AI model
- Git and GitHub
How It Works
- The user selects a folder.
- Python reads the filenames.
- The local AI model suggests a category.
- The program displays a preview.
- The user can apply the changes after reviewing the results.
Demo
Project demonstration: A screenshot of the running program will be added here after testing it locally.
The demo will show sample filenames and the categories suggested by the AI model.
Why Open-Source AI Matters
Running an open-weight model locally gives users more control over their workflow. This project uses a local Ollama service instead of a cloud AI API.
Once the model has been downloaded, classification can run locally without a cloud AI service, provided the local model and Ollama are available.
What I Learned
This project helped me explore Python file handling, connecting to a local AI model, processing JSON responses, and using GitHub to share code.
It also taught me why previewing file operations before applying changes is important.
Future Improvements
- Add a graphical user interface.
- Support nested folders.
- Detect duplicate files.
- Add an undo feature.
- Improve classification accuracy.
Project Link
GitHub Repository:
Conclusion
AI File Organizer is a learning project exploring how open-weight AI can reduce repetitive file organization work. My goal is to make the process easier while keeping users in control of their files.
This project is being prepared for the Hacktoberfest Open-Source AI Challenge: Week 3, “Slow and Steady.”
來源:DEV Community · dev.to