Instructions to use Darshan03/AI-Hackathon with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Darshan03/AI-Hackathon with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Darshan03/AI-Hackathon")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Darshan03/AI-Hackathon") model = AutoModelForSequenceClassification.from_pretrained("Darshan03/AI-Hackathon") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -56,8 +56,8 @@ import torch
|
|
| 56 |
from transformers import BertTokenizer, BertForSequenceClassification
|
| 57 |
|
| 58 |
# Load the model and tokenizer
|
| 59 |
-
model = BertForSequenceClassification.from_pretrained('
|
| 60 |
-
tokenizer = BertTokenizer.from_pretrained('
|
| 61 |
|
| 62 |
# Tokenize the input text
|
| 63 |
inputs = tokenizer("Your text here", return_tensors='pt', padding=True, truncation=True, max_length=128)
|
|
|
|
| 56 |
from transformers import BertTokenizer, BertForSequenceClassification
|
| 57 |
|
| 58 |
# Load the model and tokenizer
|
| 59 |
+
model = BertForSequenceClassification.from_pretrained('Darshan03/AI-Hackathon')
|
| 60 |
+
tokenizer = BertTokenizer.from_pretrained('Darshan03/AI-Hackathon')
|
| 61 |
|
| 62 |
# Tokenize the input text
|
| 63 |
inputs = tokenizer("Your text here", return_tensors='pt', padding=True, truncation=True, max_length=128)
|