pinggg-legal-inference-open

A specialized legal analysis model trained on Indian Law and the Indian Penal Code (IPC).

Model Details

  • Base Model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
  • Specialization: Indian Legal Analysis
  • Context Length: 2048

How to Use with Inference API

import requests

API_URL = "https://api-inference.huggingface.co/models/hel1929/pinggg-legal-inference-open"
headers = {"Authorization": "Bearer YOUR_HUGGING_FACE_API_TOKEN"}

def query(payload):
    response = requests.post(API_URL, headers=headers, json=payload)
    return response.json()
    
output = query({
    "inputs": "Person A tried to kill Person B and Person B killed Person A in self defense. Is Person B guilty?",
    "parameters": {"max_new_tokens": 500}
})

JavaScript Example

async function queryLegalModel(userQuestion) {
  const response = await fetch(
    "https://api-inference.huggingface.co/models/hel1929/pinggg-legal-inference-open",
    {
      headers: { Authorization: "Bearer YOUR_API_TOKEN" },
      method: "POST",
      body: JSON.stringify({
        inputs: userQuestion,
        parameters: {
          max_new_tokens: 500,
          temperature: 0.7,
          top_p: 0.9
        }
      }),
    }
  );
  const result = await response.json();
  return result;
}

Model Limitations

This model uses a custom system prompt with TinyLlama/TinyLlama-1.1B-Chat-v1.0 for Indian legal analysis. It should be used for educational purposes only and not for actual legal advice.

Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support