This project allows users to upload an image containing a table, extract the data using Google's Gemini AI, and download the extracted data as an Excel file. It consists of a Flutter frontend for image selection and file download, and a Node.js backend for processing the image and generating the Excel file.
- 📷 Image Upload: Select an image from your device.
- 🤖 AI-Powered Data Extraction: Use Google's Gemini AI to extract table data from the image.
- 👥 Excel Download: Download the extracted data as an Excel file.
⚠️ Error Handling: Robust error handling for invalid inputs and API failures.
- 📱 Flutter: For building the cross-platform mobile app.
- 🌐 http: For making API requests to the backend.
- 🖼️ image_picker: For selecting images from the device.
- 💾 file_saver: For saving the Excel file to the device.
- ✨ Express.js: For handling HTTP requests.
- 🤓 Google Generative AI: For extracting table data from images.
- 📚 ExcelJS: For generating Excel files.
- 🔒 dotenv: For managing environment variables.
- 🌍 cors: For enabling cross-origin requests.
- Flutter SDK: Install Flutter from flutter.dev.
- Node.js: Install Node.js from nodejs.org.
- Google Gemini API Key: Obtain an API key from Google AI Studio.
- Clone the repository:
git clone https://github.com/your-repo/table-data-extractor.git cd table-data-extractor/backend - Install dependencies:
npm install
- Create a
.envfile in the backend directory and add your Gemini API key:GEMINI_API_KEY=your_api_key_here PORT=3000
- Start the backend server:
The backend will run at
npm start
http://localhost:3000.
- Navigate to the frontend directory:
cd ../frontend - Install dependencies:
flutter pub get
- Update the backend URL in
lib/home_page.dart:final url = Uri.parse('http://localhost:3000/extract_data');
- Run the Flutter app:
flutter run
- Description: Extracts table data from an image and returns an Excel file.
- Request Body:
{ "image": "base64_encoded_image" } - Response:
- Success: Excel file (
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet). - Error: JSON with error message.
- Success: Excel file (
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your feature" - Push to the branch:
git push origin feature/your-feature-name
- Open a pull request.
For issues or questions, please open an issue on the GitHub repository.
Enjoy extracting table data with ease! 🚀
For questions, feel free to open an issue or contact me at chinmayjoshi003@gmail.com 📩