This repository contains a FastAPI-based solution that allows users to upload PDF, audio, and video files, and then process these files for summarization or question-answering. This system leverages Google Generative AI for conversational processing and summarization tasks, enabling seamless interactions with multimedia content.
- File Upload: Supports uploading multiple file types, including PDFs, audio (WAV/MP3), and video (MP4/MKV/AVI).
- PDF Summarization: Extracts text from uploaded PDFs and summarizes the content.
- Audio/Video Summarization: Uses generative AI to summarize audio and video files.
- Conversational AI: Ask questions about the uploaded content, and the system will generate answers based on the file data.
- Google Generative AI: Integrated with Google Generative AI for advanced natural language processing.
- FastAPI: Python-based web framework for building APIs.
- PyPDF2: PDF processing library to extract text from PDF files.
- Google Generative AI: API integration for language processing, summarization, and question answering.
- Langchain: Framework for chaining AI models and building conversational agents.
- Uvicorn: ASGI server for running the FastAPI application.
Endpoint to upload PDF, audio, or video files.
POST /upload/Request:
- Form-data: Files (PDF, audio, video)
Response :
{
"session_id": 1
}Generates summaries for uploaded PDF, audio, and video files within a session.
POST /summarize/Request:
- Form-data: session_id (integer)
Response:
{
"pdf_summaries": ["..."],
"audio_summaries": ["..."],
"video_summaries": ["..."]
}Allows users to ask questions related to the content of the uploaded files.
POST /ask-question/Request:
- Form-data: session_id (integer), question (string) Response:
{
"responses": ["..."]
}git clone https://github.com/SAYAPUREDDY/ConversAI-Intelligent-File-Processing-Summarization-API.gitpython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtYou need to configure the Google Generative AI API key.
export GOOGLE_API_KEY="your-google-api-key"python all_in_one.py- Upload files using the /upload/ endpoint (PDF, audio, or video).
- Get summaries of uploaded content by calling /summarize/ with the session ID.
- Ask questions about the content using the /ask-question/ endpoint.