ecopus/pgh_restaurants
Viewer • Updated • 1.1k • 17
How to use Iris314/finetuned_model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Iris314/finetuned_model") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Iris314/finetuned_model")
model = AutoModelForSequenceClassification.from_pretrained("Iris314/finetuned_model")This model predicts the cuisine type of Pittsburgh restaurants based on review text.
It was fine-tuned from distilbert-base-uncased on the dataset ecopus/pgh_restaurants.
It achieves the following results:
distilbert-base-uncased) | Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 2.6677 | 1.0 | 80 | 2.4746 | 0.3563 | 0.2142 | 0.1662 | 0.3563 |
| 1.7201 | 2.0 | 160 | 1.5893 | 0.7750 | 0.6895 | 0.6644 | 0.7750 |
| 1.1994 | 3.0 | 240 | 1.1417 | 0.8938 | 0.8503 | 0.8180 | 0.8938 |
| 1.0890 | 4.0 | 320 | 0.9315 | 0.9250 | 0.8959 | 0.8784 | 0.9250 |
| 0.7052 | 5.0 | 400 | 0.8675 | 0.9688 | 0.9570 | 0.9480 | 0.9688 |
Treat results as proof-of-concept, not production-ready.
You can load this fine-tuned DistilBERT model directly from the Hugging Face Hub and run inference:
from transformers import pipeline
# Load the fine-tuned model
classifier = pipeline("text-classification", model="YOUR_USERNAME/finetuned_model")
# Example input
sample = "This cozy little spot serves delicious tacos with great service!"
print(classifier(sample))
Base model
distilbert/distilbert-base-uncased