Pocket-Gen is a prompt generator application using Python, Flet library, and Ollama LLM. This tool helps users generate and manage prompts efficiently.
pocket-gen/
├── init.py
├── assets/
│ ├── fonts/
│ │ ├── alfont_com_SFProAR_semibold.ttf
│ │ └── SF-Pro-Text-Medium.otf
│ └── icons/
│ └── Asset.png
├── file.py
├── Logic/
│ ├── init.py
│ └── llm_logic.py
├── main.py
├── Model_Create/
│ ├── init.py
│ └── model_create.py
├── README.md
├── requirements.txt
├── strings_/
│ ├── init.py
│ └── strings.py
└── views/
├── image2txt_view.py
└── text2text_view.py
- Python 3.10 or higher
- Ollama installed on your machine
- Llava and Llama2 LLM models installed
To get started with Pocket-Gen, follow these steps:
-
Clone the repository:
git clone https://github.com/yourusername/pocket-gen.git cd pocket-gen
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Install Ollama: Follow the instructions on the Ollama website to install Ollama on your machine.
-
Install Llava and Llama2 LLM models: Follow the documentation for Llava and Llama2 to install these models on your machine.
-
Configure the app models: Run the
create_model.py
script to configure the models for the application:python Model_Create/model_create.py
After installing the dependencies and configuring the models, you can run the application using:
flet run
The main.py
script sets up a graphical user interface for the Pocket-Gen application using the Flet library. The main features include:
- Window Settings: Custom window settings such as size, padding, and always-on-top.
- Routing: Handles routing between different views (
/text_prompt
and/image2txt
). - Custom Fonts: Uses custom fonts located in the
assets/fonts
directory. - Views: Loads views from the
views
directory.
- assets/: Contains font files and icons used in the application.
- Logic/: Contains the core logic for the LLM operations.
- Model_Create/: Contains scripts for creating models.
- strings_/: Contains string management scripts.
- views/: Contains the view components for different parts of the application.
Ensure that all dependencies are installed as per the requirements.txt
file. Additionally, make sure that Ollama, Llava, and Llama2 LLM models are installed and configured properly.
If you would like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-foo
). - Commit your changes (
git commit -am 'Add feature foo'
). - Push to the branch (
git push origin feature-foo
). - Create a new Pull Request.
This project is licensed under the MIT License. See the LICENSE file for more details.
If you have any questions or feedback, feel free to contact me at [email protected].
- Thanks to the contributors of the Flet library and Ollama LLM.