Vu Anh
Claude
commited on
Commit
·
9cf063d
1
Parent(s):
1a2922b
Rename model files with descriptive names and timestamps
Browse files- Rename sklearn_model.joblib → vntc_classifier_20250927_161550.joblib
- Rename sklearn_model_uts2017_bank.joblib → uts2017_bank_classifier_20250927_161733.joblib
- Update use_this_model.py to use new descriptive filenames
- Timestamps indicate training date and time for better versioning
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
use_this_model.py
CHANGED
|
@@ -16,10 +16,10 @@ def load_model_from_hub(model_type="vntc"):
|
|
| 16 |
model_type: "vntc" for news classification or "uts2017_bank" for banking text
|
| 17 |
"""
|
| 18 |
if model_type == "vntc":
|
| 19 |
-
filename = "
|
| 20 |
print("Downloading VNTC (Vietnamese News) model from Hugging Face Hub...")
|
| 21 |
elif model_type == "uts2017_bank":
|
| 22 |
-
filename = "
|
| 23 |
print("Downloading UTS2017_Bank (Vietnamese Banking) model from Hugging Face Hub...")
|
| 24 |
else:
|
| 25 |
raise ValueError("model_type must be 'vntc' or 'uts2017_bank'")
|
|
@@ -191,7 +191,7 @@ import joblib
|
|
| 191 |
|
| 192 |
# Download and load VNTC model
|
| 193 |
vntc_model = joblib.load(
|
| 194 |
-
hf_hub_download("undertheseanlp/sonar_core_1", "
|
| 195 |
)
|
| 196 |
|
| 197 |
# Make prediction on news text
|
|
@@ -202,7 +202,7 @@ print(f"News category: {prediction}")
|
|
| 202 |
# UTS2017_Bank Model (Vietnamese Banking Text Classification)
|
| 203 |
# Download and load UTS2017_Bank model
|
| 204 |
bank_model = joblib.load(
|
| 205 |
-
hf_hub_download("undertheseanlp/sonar_core_1", "
|
| 206 |
)
|
| 207 |
|
| 208 |
# Make prediction on banking text
|
|
@@ -258,8 +258,8 @@ def main():
|
|
| 258 |
|
| 259 |
print("\nDemonstration complete!")
|
| 260 |
print("\nBoth models are now available on Hugging Face Hub:")
|
| 261 |
-
print("- VNTC (News):
|
| 262 |
-
print("- UTS2017_Bank (Banking):
|
| 263 |
|
| 264 |
except ImportError:
|
| 265 |
print("Error: huggingface_hub is required. Install with:")
|
|
|
|
| 16 |
model_type: "vntc" for news classification or "uts2017_bank" for banking text
|
| 17 |
"""
|
| 18 |
if model_type == "vntc":
|
| 19 |
+
filename = "vntc_classifier_20250927_161550.joblib"
|
| 20 |
print("Downloading VNTC (Vietnamese News) model from Hugging Face Hub...")
|
| 21 |
elif model_type == "uts2017_bank":
|
| 22 |
+
filename = "uts2017_bank_classifier_20250927_161733.joblib"
|
| 23 |
print("Downloading UTS2017_Bank (Vietnamese Banking) model from Hugging Face Hub...")
|
| 24 |
else:
|
| 25 |
raise ValueError("model_type must be 'vntc' or 'uts2017_bank'")
|
|
|
|
| 191 |
|
| 192 |
# Download and load VNTC model
|
| 193 |
vntc_model = joblib.load(
|
| 194 |
+
hf_hub_download("undertheseanlp/sonar_core_1", "vntc_classifier_20250927_161550.joblib")
|
| 195 |
)
|
| 196 |
|
| 197 |
# Make prediction on news text
|
|
|
|
| 202 |
# UTS2017_Bank Model (Vietnamese Banking Text Classification)
|
| 203 |
# Download and load UTS2017_Bank model
|
| 204 |
bank_model = joblib.load(
|
| 205 |
+
hf_hub_download("undertheseanlp/sonar_core_1", "uts2017_bank_classifier_20250927_161733.joblib")
|
| 206 |
)
|
| 207 |
|
| 208 |
# Make prediction on banking text
|
|
|
|
| 258 |
|
| 259 |
print("\nDemonstration complete!")
|
| 260 |
print("\nBoth models are now available on Hugging Face Hub:")
|
| 261 |
+
print("- VNTC (News): vntc_classifier_20250927_161550.joblib")
|
| 262 |
+
print("- UTS2017_Bank (Banking): uts2017_bank_classifier_20250927_161733.joblib")
|
| 263 |
|
| 264 |
except ImportError:
|
| 265 |
print("Error: huggingface_hub is required. Install with:")
|
uts2017_bank_classifier_20250927_161733.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:729e6e6d7b34dc1057275d15ce0d8475ffc1b614a13fbc0f174155e9dec4795d
|
| 3 |
+
size 3029656
|
vntc_classifier_20250927_161550.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b25b914bfacc590165e0ce35e944815cf1fda52d9d2fadf79334c5bc2754b360
|
| 3 |
+
size 2393144
|