This project is a simple web application built with Flask that allows users to upload images of One Piece card game cards and get information about them. It uses Google's Gemini API to extract text from the images and then searches through a database of card information to find the matching card.
- Install Poetry:
pip install poetry
- Install Dependencies:
poetry install
- Create a .env file:
cp .env.example .env
- Set your Gemini API key in the .env file:
GEMINI_API_KEY=YOUR_API_KEY
- Run the application:
poetry run python app.py
- Access the application in your browser:
http://127.0.0.1:5000/
- Upload an image:
- The application will redirect you to the
/images
page, where you can see a list of uploaded images. - Click the "Upload Image" button and select the image you want to upload.
- The image will be uploaded and displayed on the page.
- The application will redirect you to the
- Recognize a card:
- The application will automatically try to recognize the card in the uploaded image and will display the results as a JSON object.
- You can also access the extracted data and search results as a JSON file in the
/data/processing_output
directory.
- Image upload functionality.
- Card recognition using Google's Gemini API.
- Search for matching cards in a database.
- Display of card information in a JSON format.
- Build the Docker image:
docker-compose build
- Start the application:
docker-compose up -d
- Access the application in your browser:
http://127.0.0.1:5000/