Commit
·
03a5442
1
Parent(s):
beec65b
Add debug print statments
Browse files
app.py
CHANGED
|
@@ -11,14 +11,19 @@ os.makedirs(SINATOOLS_DIR, exist_ok=True)
|
|
| 11 |
# Destination path
|
| 12 |
dest_path = os.path.join(SINATOOLS_DIR)
|
| 13 |
|
|
|
|
| 14 |
# Download explicitly to the expected path
|
| 15 |
download_folder_from_hf("SinaLab/ArabGlossBERT", "bert-base-arabertv02_22_May_2021_00h_allglosses_unused01")
|
| 16 |
download_folder_from_hf("SinaLab/ArabGlossBERT", "bert-base-arabertv02")
|
| 17 |
|
|
|
|
|
|
|
| 18 |
# download_file(url='https://sina.birzeit.edu/four_grams.pickle', dest_path=dest_path)
|
| 19 |
|
| 20 |
|
| 21 |
@app.get("/predict")
|
| 22 |
def greet_json():
|
|
|
|
| 23 |
salma_output = disambiguate('تمشيت بين الجداول والأنهار')
|
|
|
|
| 24 |
return {"output": salma_output}
|
|
|
|
| 11 |
# Destination path
|
| 12 |
dest_path = os.path.join(SINATOOLS_DIR)
|
| 13 |
|
| 14 |
+
print("Start loading")
|
| 15 |
# Download explicitly to the expected path
|
| 16 |
download_folder_from_hf("SinaLab/ArabGlossBERT", "bert-base-arabertv02_22_May_2021_00h_allglosses_unused01")
|
| 17 |
download_folder_from_hf("SinaLab/ArabGlossBERT", "bert-base-arabertv02")
|
| 18 |
|
| 19 |
+
print("Finish loading")
|
| 20 |
+
|
| 21 |
# download_file(url='https://sina.birzeit.edu/four_grams.pickle', dest_path=dest_path)
|
| 22 |
|
| 23 |
|
| 24 |
@app.get("/predict")
|
| 25 |
def greet_json():
|
| 26 |
+
print("Start disambiguate")
|
| 27 |
salma_output = disambiguate('تمشيت بين الجداول والأنهار')
|
| 28 |
+
print("End disambiguate")
|
| 29 |
return {"output": salma_output}
|