by Muhammad
Extract contact information from CV's (from pdf or word + multiple files) to Excel spreadsheet
from flask import jsonify
from flask import request
from flask import Flask
import json
from abilities import llm_prompt
import logging
import os
from models import db
import re
import PyPDF2
import pandas as pd
import csv
from werkzeug.utils import secure_filename
from flask import render_template
from flask import send_file
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
app = Flask(__name__, static_folder='static')
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///database.sqlite'
db.init_app(app)
with app.app_context():
db.create_all()
Created: | Last Updated:
Introduction to the PDF and Word to Excel Conversion Template
This template is designed to help you convert PDF and Word documents into an Excel spreadsheet format with ease. It's perfect for builders who need to extract names, phone numbers, and emails from multiple documents and compile them into a single, organized Excel file. The template uses a Flask web application to upload files, process them, and return the extracted data as an Excel file.
Getting Started
To begin using this template, click on "Start with this Template" on the Lazy platform. This will set up the template in your Lazy Builder interface, pre-populating the code so you can start customizing and testing right away.
Test: Deploying the App
Once you have the template loaded, press the "Test" button to deploy the app. The Lazy CLI will handle the deployment process, and you won't need to worry about installing libraries or setting up your environment. After the deployment is complete, Lazy will provide you with a dedicated server link to use the app.
Using the App
After deployment, navigate to the provided server link to access the web interface. Here, you can upload your PDF or Word documents. The app will process these files and extract the required information. Once the processing is complete, you can download the results in an Excel format directly from the web interface.
Integrating the App
If you need to integrate this app into another service or frontend, you can use the server link provided by Lazy. For example, you could add the link to a button on your website that allows users to upload documents and receive an Excel file in return.
Remember, this template is a starting point. You can customize the code to fit your specific needs or integrate it with other tools and services to create a more robust solution.
If you need to refer to the documentation for any of the libraries used in this template, such as Flask or PyPDF2, you can find their documentation at:
For any further customization or integration, you may refer to the sample code provided within the template to understand how to work with the extracted data and potentially integrate it into other tools or services.
By following these steps, you should be able to successfully use the PDF and Word to Excel Conversion template on the Lazy platform to streamline your document processing tasks.