abdulrahmanEldabah/pdf-chatbot-assistant

TypeScript

0

1 commits

updated Jun 8, 2025

See the code

README

PDF Chatbot Assistant

A web application that allows users to upload PDF files and ask questions about their content using an AI model (Hugging Face FLAN-T5). The app consists of an Angular frontend and an ASP.NET Core backend.

Features

  • Upload PDF files and extract their text
  • Ask questions about the uploaded PDF
  • AI-powered answers using Hugging Face Inference API
  • Modern, user-friendly chat interface
  • Error handling and validation

Technologies

  • Frontend: Angular 7
  • Backend: ASP.NET Core 9
  • AI: Hugging Face Inference API (FLAN-T5)

Getting Started

Prerequisites

Backend Setup

  1. Navigate to the backend directory:
    cd PdfChatbotBackend
    
  2. Restore dependencies:
    dotnet restore
    
  3. Set your Hugging Face API token (do not commit this to source control!):
    • Edit appsettings.json and set:
      "HuggingFace": {
        "ApiToken": "YOUR_HUGGING_FACE_API_TOKEN"
      }
      
    • Or set as an environment variable:
      set HuggingFace__ApiToken=YOUR_HUGGING_FACE_API_TOKEN
      
  4. Run the backend:
    dotnet run
    
    The backend will be available at https://localhost:5001.

Frontend Setup

  1. Navigate to the frontend directory:
    cd pdf-chatbot-frontend
    
  2. Install dependencies:
    npm install
    
  3. Start the frontend:
    npm start
    
    The frontend will be available at http://localhost:4200 (or as configured).

API Documentation

  • The backend uses Swagger for API documentation. Once running, visit:
    • https://localhost:5001/swagger

Project Structure

PDF-Chatbot-Assistant/
  pdf-chatbot-frontend/   # Angular frontend
  PdfChatbotBackend/      # ASP.NET Core backend

Environment Variables

  • HuggingFace__ApiToken: Your Hugging Face API token (required for backend)

Security

  • Never commit secrets (API tokens, passwords) to source control.
  • Use environment variables or secret managers for sensitive data.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

MIT


Further Documentation

abdulrahmanEldabah/pdf-chatbot-assistant

TypeScript

0

1 commits

updated Jun 8, 2025

See the code

README

PDF Chatbot Assistant

A web application that allows users to upload PDF files and ask questions about their content using an AI model (Hugging Face FLAN-T5). The app consists of an Angular frontend and an ASP.NET Core backend.

Features

  • Upload PDF files and extract their text
  • Ask questions about the uploaded PDF
  • AI-powered answers using Hugging Face Inference API
  • Modern, user-friendly chat interface
  • Error handling and validation

Technologies

  • Frontend: Angular 7
  • Backend: ASP.NET Core 9
  • AI: Hugging Face Inference API (FLAN-T5)

Getting Started

Prerequisites

Backend Setup

  1. Navigate to the backend directory:
    cd PdfChatbotBackend
    
  2. Restore dependencies:
    dotnet restore
    
  3. Set your Hugging Face API token (do not commit this to source control!):
    • Edit appsettings.json and set:
      "HuggingFace": {
        "ApiToken": "YOUR_HUGGING_FACE_API_TOKEN"
      }
      
    • Or set as an environment variable:
      set HuggingFace__ApiToken=YOUR_HUGGING_FACE_API_TOKEN
      
  4. Run the backend:
    dotnet run
    
    The backend will be available at https://localhost:5001.

Frontend Setup

  1. Navigate to the frontend directory:
    cd pdf-chatbot-frontend
    
  2. Install dependencies:
    npm install
    
  3. Start the frontend:
    npm start
    
    The frontend will be available at http://localhost:4200 (or as configured).

API Documentation

  • The backend uses Swagger for API documentation. Once running, visit:
    • https://localhost:5001/swagger

Project Structure

PDF-Chatbot-Assistant/
  pdf-chatbot-frontend/   # Angular frontend
  PdfChatbotBackend/      # ASP.NET Core backend

Environment Variables

  • HuggingFace__ApiToken: Your Hugging Face API token (required for backend)

Security

  • Never commit secrets (API tokens, passwords) to source control.
  • Use environment variables or secret managers for sensitive data.

Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

License

MIT


Further Documentation