Welcome to our guide on using the AutoNLP Model specifically crafted for multi-class classification tasks! In this article, we’ll walk you through the usage of a trained model that classifies bank transactions based on inputs. This model harnesses the power of AutoNLP 🤗, ensures accuracy, and provides straightforward access through various programming approaches.
Understanding the Model Overview
Before diving into the usage instructions, let’s break down the fundamental aspects of this model:
- Problem Type: Multi-class Classification
- Model ID: 5521155
Validation Metrics of the Model
To appreciate this model’s performance, here are some essential validation metrics:
- Loss: 1.3173
- Accuracy: 82.21%
- Macro F1: 0.5714
- Micro F1: 82.21%
- Weighted F1: 0.8217
- Macro Precision: 0.6064
- Micro Precision: 82.21%
- Weighted Precision: 84.92%
- Macro Recall: 0.5873
- Micro Recall: 82.21%
- Weighted Recall: 82.21%
How to Access the Model
Accessing the model can be done in multiple ways. Below, we outline two different approaches using cURL and the Python API.
Using cURL
You can quickly access the model by executing a cURL command in your terminal. Here’s how:
$ curl -X POST -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"inputs": "I love AutoNLP"}' https://api-inference.huggingface.co/models/mgrella/autonlp-bank-transaction-classification-5521155
Using Python API
If you prefer Python, here’s a simple snippet to get you started:
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model = AutoModelForSequenceClassification.from_pretrained("mgrella/autonlp-bank-transaction-classification-5521155", use_auth_token=True)
tokenizer = AutoTokenizer.from_pretrained("mgrella/autonlp-bank-transaction-classification-5521155", use_auth_token=True)
inputs = tokenizer("I love AutoNLP", return_tensors="pt")
outputs = model(**inputs)
Understanding the Code: An Analogy
Imagine you are a chef preparing various dishes based on customers’ preferences. Each customer’s order is unique, much like the input text you provide to the model. The model acts like your assistant, efficiently categorizing and preparing dishes that meet the specifications outlined in the input.
When you use the cURL command or the Python API, you’re essentially placing an order for the model to execute its task. The inputs, like customer feedback, are processed and lead to specific outputs (predictions) based on the model’s training. This dynamic allows us to leverage the model’s capabilities for various applications in banking transaction classification.
Troubleshooting Your Experience
While accessing or utilizing the model, you may encounter some issues. Here are a few troubleshooting tips:
- Ensure your API key is correctly set and has the necessary permissions.
- If you receive a connection error, verify your network status and API URL.
- For Python-related issues, ensure all dependencies are installed and up to date.
For more insights, updates, or to collaborate on AI development projects, stay connected with fxis.ai.
Concluding Thoughts
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations. We hope this guide helps you leverage the power of AutoNLP to enhance your projects and insights in the field!

