GradioApps / README_HF.md
nrigheriu's picture
added app files
869f31e verified

A newer version of the Gradio SDK is available: 6.13.0

Upgrade

RAG PDF Chat Application

A powerful Retrieval-Augmented Generation (RAG) application that allows you to upload PDF documents and ask questions about their content using AI.

Features

  • PDF Upload: Upload PDF documents and automatically process them into searchable chunks
  • AI-Powered Q&A: Ask questions about your uploaded PDFs and get intelligent answers
  • Vector Search: Uses advanced embedding technology to find relevant information
  • Source Tracking: See which parts of your documents contributed to each answer

How to Use

  1. Upload a PDF: Go to the "Upload PDF" tab and select a PDF file from your computer
  2. Wait for Processing: The app will automatically chunk and embed your document
  3. Ask Questions: Switch to the "Ask Questions" tab and enter your questions
  4. Get Answers: Receive AI-generated answers based on your document content

Technical Details

  • Vector Database: Uses Qdrant for efficient similarity search
  • Embeddings: OpenAI's text-embedding-3-large model for document chunking
  • Language Model: GPT-4 for generating intelligent answers
  • Framework: Built with Gradio for easy deployment

Environment Variables

Make sure to set your OpenAI API key:

OPENAI_API_KEY=your_openai_api_key_here

Deployment

This app is designed to run on Hugging Face Spaces. Simply push this repository to a Hugging Face Space and it will automatically deploy.