Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,11 +40,12 @@ device = torch.device("cpu")
|
|
| 40 |
def load_model():
|
| 41 |
global model, config
|
| 42 |
if model is None or config is None:
|
| 43 |
-
print("๐ ุชุญู
ูู ุงููู
ูุฐุฌ ูุฃูู ู
ุฑุฉ...")
|
| 44 |
model_path = snapshot_download(
|
| 45 |
repo_id="shahad-alh/arabichar-finetuned-v2",
|
| 46 |
local_dir="./model"
|
| 47 |
)
|
|
|
|
| 48 |
config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
|
| 49 |
model = AutoModelForImageClassification.from_pretrained(
|
| 50 |
model_path,
|
|
|
|
| 40 |
def load_model():
|
| 41 |
global model, config
|
| 42 |
if model is None or config is None:
|
| 43 |
+
print("๐ ุชุญู
ูู ุงููู
ูุฐุฌ ูุฃูู ู
ุฑุฉ ู
ู Hugging Face Hub...")
|
| 44 |
model_path = snapshot_download(
|
| 45 |
repo_id="shahad-alh/arabichar-finetuned-v2",
|
| 46 |
local_dir="./model"
|
| 47 |
)
|
| 48 |
+
# ุชุญู
ูู ุงูููุฏ ุงูู
ุฎุตุต ู
ุน trust_remote_code=True
|
| 49 |
config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
|
| 50 |
model = AutoModelForImageClassification.from_pretrained(
|
| 51 |
model_path,
|