Spaces:
Sleeping
Sleeping
Commit ·
131d52a
1
Parent(s): 8e5aaaf
Update pkl file download
Browse files
app.py
CHANGED
|
@@ -4,11 +4,24 @@ from sinatools.DataDownload.downloader import download_file
|
|
| 4 |
from sinatools.morphology.morph_analyzer import analyze
|
| 5 |
|
| 6 |
from sinatools.DataDownload.downloader import download_folder_from_hf
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
# download_file('https://sina.birzeit.edu/lemmas_dic.pickle')
|
| 11 |
-
download_folder_from_hf("TymaaHammouda/testing_lemmatizer_model", 'lemmas_dic.pickle')
|
| 12 |
|
| 13 |
# args_path = hf_hub_download(
|
| 14 |
# repo_id="SinaLab/Nested",
|
|
|
|
| 4 |
from sinatools.morphology.morph_analyzer import analyze
|
| 5 |
|
| 6 |
from sinatools.DataDownload.downloader import download_folder_from_hf
|
| 7 |
+
import os
|
| 8 |
|
| 9 |
|
| 10 |
app = FastAPI()
|
| 11 |
+
|
| 12 |
+
SINATOOLS_DIR = os.path.expanduser("~/.sinatools")
|
| 13 |
+
os.makedirs(SINATOOLS_DIR, exist_ok=True)
|
| 14 |
+
|
| 15 |
+
# Destination path
|
| 16 |
+
dest_path = os.path.join(SINATOOLS_DIR, "lemmas_dic.pickle")
|
| 17 |
+
|
| 18 |
+
# Download explicitly to the expected path
|
| 19 |
+
download_file(
|
| 20 |
+
url="https://sina.birzeit.edu/lemmas_dic.pickle",
|
| 21 |
+
dest_path=dest_path
|
| 22 |
+
)
|
| 23 |
# download_file('https://sina.birzeit.edu/lemmas_dic.pickle')
|
| 24 |
+
# download_folder_from_hf("TymaaHammouda/testing_lemmatizer_model", 'lemmas_dic.pickle')
|
| 25 |
|
| 26 |
# args_path = hf_hub_download(
|
| 27 |
# repo_id="SinaLab/Nested",
|