Usage Guide

Getting Started

  1. Install Dependencies:

    pip install -r requirements.txt
    
  2. Set Environment Variable: - Set the HUGGINGFACEHUB_API_TOKEN environment variable with your Hugging Face API token.

  3. Run the App:

    streamlit run Questro.py
    

Interacting with the Chatbot

  • Pre-loaded Document: The chatbot starts with a pre-loaded document (“data/ConstitutionOfIndia.pdf”). You can ask questions about this document immediately.

  • Uploading Documents:
    • Use the sidebar to upload your own PDF, DOCX, or TXT files.

    • Click the “Submit & Process” button to create a new index from your files.

  • Asking Questions:
    • Type your questions in the chat input at the bottom of the app.

    • The chatbot will provide answers based on the indexed documents.

Examples

Question about the pre-loaded document:

What are the fundamental rights in the Indian Constitution?

Question after uploading a document about machine learning:

What are the different types of machine learning algorithms?