AskYourDocs is a Streamlit-based application that allows users to upload a file and interact with it through a chat-like interface. The app uses Retrieval-Augmented Generation (RAG) to generate embeddings from the uploaded file and provides responses to user queries based on the content of the file.
- File Upload: Upload text-based files (e.g.,
.txt
,.pdf
,.docx
). - Chat Interface: Interact with the uploaded file using a conversational interface.
- RAG Integration: Leverages OpenAI's embeddings and GPT models to generate contextually relevant responses.
- Session Management: Maintains chat history during the session.
Before running the app, ensure you have the following installed:
- Python 3.8 or higher
- Streamlit
-
Clone the repository:
git clone https://github.com/Harsh-2909/askyourdocs.git cd askyourdocs
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the Streamlit app:
streamlit run askmydocs.py
-
Open your browser and navigate to the URL provided in the terminal (usually
http://localhost:8501
). -
Upload a file using the sidebar. Supported file types include
.txt
,.pdf
, and.md
. -
Once the file is uploaded, you can start chatting with it. Enter your query in the chat input box and click "Submit" to get a response.
-
The chat history will be displayed in the main interface, allowing you to continue the conversation.
- Upload a text file containing information about a topic (e.g., a research paper or a book chapter).
- Ask questions like:
- "What is the main idea of this document?"
- "Can you summarize the key points?"
- "Explain the concept of X mentioned in the document."
- The app will generate responses based on the content of the uploaded file.
- File Types: Extend the app to support additional file types by integrating appropriate document loaders from LangChain.
- UI Enhancements: Customize the Streamlit UI to improve the user experience.
- Advanced Models: Replace the default OpenAI GPT model with other language models or fine-tune the RAG pipeline for specific use cases.
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Commit your changes and push to the branch.
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Streamlit for the interactive web app framework.
- LangChain for the RAG pipeline and document processing.
- OpenAI for the embeddings and GPT models.
Enjoy interacting with your files using AskYourDocs! 🚀