datascientist22's picture
Update README.md
c447a5c verified

A newer version of the Gradio SDK is available: 5.19.0

Upgrade
metadata
title: Legal Advice Chatbot
emoji: 💬
colorFrom: yellow
colorTo: purple
sdk: gradio
sdk_version: 4.36.1
app_file: app.py
pinned: false

An example chatbot using Gradio, huggingface_hub, and the Hugging Face Inference API.

# ⚖️ Legal AI Assistant Chatbot:

This is a Gradio-based Legal AI Assistant Chatbot designed to assist with legal queries related to Pakistani law. The chatbot can process both text-based questions and extract text from uploaded PDF or image files.

Features

  • Legal Expertise: Provides precise, actionable, and lawful advice based on Pakistani law.
  • File Upload: Supports PDF and image uploads to extract and analyze case files.
  • Conversation History: Saves the chat history as a downloadable PDF.

Installation

To run this project locally:

  1. Clone the repository:

    git clone https://github.com/mldatascientist23/Generative_AI_Projects.git
    cd legal-ai-chatbot
    
  2. Install the required Python packages:

    pip install -r requirements.txt
    
  3. Run the Gradio app:

    python app.py
    

Usage

  • Ask a Question: Enter your legal query in the text box.
  • Upload a File: Upload a case file (PDF or image) to extract text and analyze.
  • Save Conversation: Download the conversation history as a PDF for future reference.

Created by

Engr. Hamesh Raj


This project is a part of my work in developing AI tools for legal professionals. Feel free to explore, contribute, or reach out with any questions!