Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
---
|
| 2 |
title: Precision Legal Intelligence AdeemAlotaibi
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: red
|
| 6 |
sdk: docker
|
|
@@ -14,20 +14,20 @@ LEX is an AI-powered legal analysis system designed to bridge the "Access to Jus
|
|
| 14 |
LEX utilizes an AISA (Agentic Interactive System Architecture) workflow that runs 6 specialized agents across 4 logical phases. To ensure a professional and responsive user experience, the system employs Python's ThreadPoolExecutor to reduce processing time from ~20 seconds to just 10–12 seconds.
|
| 15 |
|
| 16 |
## 🚀 Setup & Installation
|
| 17 |
-
- Prerequisites
|
| 18 |
Python 3.9+
|
| 19 |
OpenAI API Key (Optimized for gpt-4o-mini)
|
| 20 |
Required Libraries: pydantic, faiss-cpu, sqlite3, concurrent.futures
|
| 21 |
|
| 22 |
-
- Installation
|
| 23 |
-
Clone the repository:
|
| 24 |
Bash: git clone https://huggingface.co/spaces/AISA-Framework/LEX-AdeemAlotaibi
|
| 25 |
cd LEX-AdeemAlotaibi
|
| 26 |
|
| 27 |
-
Install dependencies:
|
| 28 |
Bash: pip install -r requirements.txt
|
| 29 |
|
| 30 |
-
Configure Environment:
|
| 31 |
Set AISA_DETERMINISTIC=1 for reproducible test results
|
| 32 |
|
| 33 |
|
|
@@ -37,30 +37,30 @@ Set AISA_DETERMINISTIC=1 for reproducible test results
|
|
| 37 |
LEX is designed to be intuitive for users facing legal stress.The system processes messy, real-world text and converts it into a structured legal analysis.
|
| 38 |
|
| 39 |
### 1. Inputting a Case
|
| 40 |
-
|
| 41 |
-
*
|
| 42 |
-
*
|
| 43 |
-
*
|
| 44 |
|
| 45 |
### 2. The Analysis Process
|
| 46 |
-
|
| 47 |
-
*
|
| 48 |
-
*
|
| 49 |
-
* **Automated Quality Check:** The Critic Agent reviews the analysis.
|
| 50 |
|
| 51 |
### 3. Understanding the Output
|
| 52 |
-
|
| 53 |
-
*
|
| 54 |
-
*
|
| 55 |
-
*
|
| 56 |
-
*
|
| 57 |
-
|
| 58 |
### 4. Example Scenarios
|
| 59 |
| Scenario | Expected Output |
|
| 60 |
| :--- | :--- |
|
| 61 |
-
| **Landlord Notice** |
|
| 62 |
-
| **Salary Reduction** |
|
| 63 |
-
| **Court Judgment** |
|
| 64 |
|
| 65 |
|
| 66 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
title: Precision Legal Intelligence AdeemAlotaibi
|
| 3 |
+
emoji: ⚖️
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: red
|
| 6 |
sdk: docker
|
|
|
|
| 14 |
LEX utilizes an AISA (Agentic Interactive System Architecture) workflow that runs 6 specialized agents across 4 logical phases. To ensure a professional and responsive user experience, the system employs Python's ThreadPoolExecutor to reduce processing time from ~20 seconds to just 10–12 seconds.
|
| 15 |
|
| 16 |
## 🚀 Setup & Installation
|
| 17 |
+
- **Prerequisites**
|
| 18 |
Python 3.9+
|
| 19 |
OpenAI API Key (Optimized for gpt-4o-mini)
|
| 20 |
Required Libraries: pydantic, faiss-cpu, sqlite3, concurrent.futures
|
| 21 |
|
| 22 |
+
- **Installation**
|
| 23 |
+
**Clone the repository:**
|
| 24 |
Bash: git clone https://huggingface.co/spaces/AISA-Framework/LEX-AdeemAlotaibi
|
| 25 |
cd LEX-AdeemAlotaibi
|
| 26 |
|
| 27 |
+
**Install dependencies:**
|
| 28 |
Bash: pip install -r requirements.txt
|
| 29 |
|
| 30 |
+
**Configure Environment:**
|
| 31 |
Set AISA_DETERMINISTIC=1 for reproducible test results
|
| 32 |
|
| 33 |
|
|
|
|
| 37 |
LEX is designed to be intuitive for users facing legal stress.The system processes messy, real-world text and converts it into a structured legal analysis.
|
| 38 |
|
| 39 |
### 1. Inputting a Case
|
| 40 |
+
Users can input their legal situation in the text area (up to 8,000 characters).This can include:
|
| 41 |
+
* **Narratives:** Describing a dispute or situation in plain language.
|
| 42 |
+
* **Document Text:** Pasting the content of a termination notice, contract clause, or court judgment.
|
| 43 |
+
* **Multilingual Input:** Input can be in Arabic or English; the system is robust enough to categorize and analyze both.
|
| 44 |
|
| 45 |
### 2. The Analysis Process
|
| 46 |
+
Once submitted, the system triggers the **AISA Workflow**:
|
| 47 |
+
* **Instant Identification:** The system immediately identifies the "Intent" (e.g., is this a notice, a contract, or a judgment?).
|
| 48 |
+
* **Plain Language Explanation:** It translates complex legal jargon into an easy-to-understand summary using the RAG tool.
|
| 49 |
+
* **Automated Quality Check:** The Critic Agent reviews the analysis. If it misses a key legal point (like a specific 90-day notice rule), it automatically re-runs the logic to ensure accuracy.
|
| 50 |
|
| 51 |
### 3. Understanding the Output
|
| 52 |
+
The user receives an **Analysis Report** containing:
|
| 53 |
+
* **Summary:** A clear explanation of "what is happening."
|
| 54 |
+
* **Risk Assessment:** A visual indicator of the risk level (Low, Medium, or High).
|
| 55 |
+
* **Action Plan:** Targeted next steps (e.g., "mentions notice period violation" or "first action step urgency=high").
|
| 56 |
+
* **Key Points:** Critical legal facts detected by the Reasoning Agent.
|
| 57 |
+
|
| 58 |
### 4. Example Scenarios
|
| 59 |
| Scenario | Expected Output |
|
| 60 |
| :--- | :--- |
|
| 61 |
+
| **Landlord Notice** | Intent: `Notice`, Risk: `Medium`, Action: Notice period validation. |
|
| 62 |
+
| **Salary Reduction** | Intent: `Contract`, Risk: `Medium`, Action: Wage violation check. |
|
| 63 |
+
| **Court Judgment** | Intent: `Judgment`, Risk: `High`, Action: Urgent payment/appeal steps. |
|
| 64 |
|
| 65 |
|
| 66 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|