Welcome to the Food Journal LLM! This application allows users to track their food intake, analyze ingredients, and maintain a personal food journal with ease. The app provides a seamless login and signup system, along with intuitive interfaces for logging meals and reviewing food entries. Basic architechture
Ensure you have the following installed:
- Python 3.8 or higher
- Poetry
git clone https://github.com/your-username/food-journal-llm.git
cd food-journal-llm
poetry install
Before running the application, ensure you have a configuration file located at config/config.yaml
. This file should contain the necessary credentials and settings for user authentication.
Example config.yaml
:
credentials:
usernames:
user1:
name: "User One"
password: "hashed_password"
cookie:
name: "food_journal_cookie"
key: "random_key"
expiry_days: 30
pre-authorized:
emails: []
The application requires an OpenAI API key for some of its functionalities. Create a .env
file in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
Replace your_openai_api_key_here
with your actual OpenAI API key.
To start the application, run the following command:
poetry run streamlit run app.py
This will launch the Food Journal LLM in your default web browser.
- Navigation: Use the sidebar to switch between the Login and Signup pages.
- Login: Enter your username and password to log in. If successful, you will be greeted with a welcome message and access to the food journal features.
- Signup: Register a new user by providing an email, username, and name. Once registered, you can log in with the new credentials.
- User Authentication: Secure login and signup system with cookie-based session management.
- Food Journal Entry: Log meals with details such as food items, meal category, date, time, and mood after eating.
- Ingredient Analysis: Analyze ingredients for nutritional content and other relevant data.
- SQL Integration: Store and retrieve journal entries from an SQL database.
We welcome contributions to enhance the functionality of this application. To contribute:
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
. - Make your changes and commit them:
git commit -m 'Add new feature'
. - Push to the branch:
git push origin feature-branch
. - Open a pull request.
Please ensure your contributions adhere to the coding standards and are well-documented.
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Thank you for using Food Journal LLM! If you encounter any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request.