Instructions to use abdullahiqbal2610/french-urdu-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Scikit-learn
How to use abdullahiqbal2610/french-urdu-detector with Scikit-learn:
from huggingface_hub import hf_hub_download import joblib model = joblib.load( hf_hub_download("abdullahiqbal2610/french-urdu-detector", "sklearn_model.joblib") ) # only load pickle files from sources you trust # read more about it here https://skops.readthedocs.io/en/stable/persistence.html - Notebooks
- Google Colab
- Kaggle
French / Roman Urdu Language Detector
A lightweight language classification model using TF-IDF + Logistic Regression (scikit-learn).
Usage
import joblib
clf = joblib.load("logistic_regression_model.joblib")
vectorizer = joblib.load("tfidf_vectorizer.joblib")
text = "Bonjour comment allez vous"
prediction = clf.predict(vectorizer.transform([text]))[0]
print(prediction) # → French
Performance
- Accuracy: 100.00% on held-out test set (20% split)
- Features: 1913 character n-gram TF-IDF features (2–4 grams,
char_wb) - Training data: 50 French + 50 Roman Urdu dummy phrases
Files
| File | Description |
|---|---|
logistic_regression_model.joblib |
Trained LogisticRegression classifier |
tfidf_vectorizer.joblib |
Fitted TfidfVectorizer (char n-grams) |
- Downloads last month
- -