|
--- |
|
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](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and the [Hugging Face Inference API](https://huggingface.co/docs/api-inference/index). |
|
|
|
[# ⚖️ Legal AI Assistant Chatbot:](https://huggingface.co/spaces/datascientist22/legal-advice-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: |
|
```bash |
|
git clone https://github.com/mldatascientist23/Generative_AI_Projects.git |
|
cd legal-ai-chatbot |
|
``` |
|
|
|
2. Install the required Python packages: |
|
```bash |
|
pip install -r requirements.txt |
|
``` |
|
|
|
3. Run the Gradio app: |
|
```bash |
|
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](https://www.linkedin.com/in/datascientisthameshraj/) |
|
|
|
--- |
|
|
|
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! |