Edit model card

Model Trained Using AutoTrain

  • Problem type: Summarization
  • Model ID: 94046145981
  • CO2 Emissions (in grams): 4.5351

Validation Metrics

  • Loss: 1.876
  • Rouge1: 45.886
  • Rouge2: 18.852
  • RougeL: 27.850
  • RougeLsum: 40.554
  • Gen Len: 104.307

Usage

You can use cURL to access this model:

$ curl -X POST -H "Authorization: Bearer YOUR_HUGGINGFACE_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoTrain"}' https://api-inference.huggingface.co/sudeepshouche/autotrain-sushi-94046145981

Or try this python code:

class TextSummarizer:
    def __init__(self):
        self.api_token = <HF_TOKEN>
        self.model = "sudeepshouche/autotrain-sushi-94046145981"

    def summarize(self, content):
        api_url = f"https://api-inference.huggingface.co/models/{self.model}"
        headers = {"Authorization": f"Bearer {self.api_token}"}
        payload = {"inputs": content}

        try:
            response = requests.post(api_url, headers=headers, json=payload)
            response.raise_for_status()
            return response.json()
        except requests.RequestException as e:
            print(f"Error during summarization: {e}")
            # logging.error(f"Error during summarization: {e}")
            return [{'summary_text': content}]

content = <CONTENT_TO_SUMMARIZE>
output = TextSummarizer().summarize(content)
print (output[0]["summary_text"] )
Downloads last month
2
Safetensors
Model size
406M params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.