Inspiration

I was inspired by a real-world problem: my own family's loan papers were in Gujarati and totally confusing. I realized that almost everyone faces complex documents they can't understand, which can be stressful. I wanted to build a simple tool to fix that.

What it does

Lexi is a simple web app where you can upload any confusing document – a PDF, Word doc, or even just a photo of a paper. It reads everything, figures out the language, and gives you a quick, easy-to-understand summary of what's important. You can even get the summary in a different language.

How I built it

I used Python and Flask for the backend, with a simple HTML, CSS, and JavaScript frontend. The magic comes from the Google Gemini 1.5 Flash model, which handles all the document reading and analysis. I also used libraries like PyMuPDF and Pillow to support all the different file types.

Challenges I ran into

One of my biggest challenges was making the app reliably handle any type of document a user might upload. It wasn't just about reading a text file; I had to build logic to process text-based PDFs, scanned PDFs that are essentially images, and regular image files. Figuring out the best way to extract content from each format and pass it to the AI took some trial and error.

I also spent a lot of time tweaking my prompts. It took a while to learn how to "talk" to the model to get the accurate, structured summaries I wanted, especially across different languages.

Accomplishments that I'm proud of

I'm just really proud that it works! Taking a photo of a paper in one language and getting a useful summary in another feels amazing. I managed to build a tool that can genuinely help people feel more confident with their documents.

What I learned

I learned a ton about how powerful modern AI is. The main lesson was in prompt engineering – you have to learn how to ask the AI questions in just the right way to get good results. It's like a new skill.

What's next for Lexi: Your AI Legal Navigator

Next, I'd love to add a chatbot so you can ask specific questions about your document. I'm also thinking about ways to help connect users with real legal aid if they need more serious help.

Built With

Share this project:

Updates