cool commited on
Commit
a44132a
·
verified ·
1 Parent(s): 31cdf35

Create install_model.py

Browse files
Files changed (1) hide show
  1. install_model.py +10 -0
install_model.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ import argostranslate.package
2
+ import os
3
+
4
+ model_path = "/app/models/en_kab_comp"
5
+ if os.path.isdir(model_path):
6
+ package = argostranslate.package.Package(model_path)
7
+ argostranslate.package.install_from_path(package)
8
+ print("Kabyle model installed.")
9
+ else:
10
+ print("Model path not found.")