Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ st.set_page_config(
|
|
13 |
page_icon="📚",
|
14 |
layout="wide"
|
15 |
)
|
16 |
-
|
17 |
# Add Arabic stop words
|
18 |
ARABIC_STOP_WORDS = {
|
19 |
'في', 'من', 'إلى', 'على', 'عن', 'مع', 'خلال', 'حتى', 'إذا', 'ثم',
|
@@ -32,7 +32,6 @@ ARABIC_STOP_WORDS = {
|
|
32 |
'لازم', 'حاجة', 'علي', 'يجب', 'صار', 'صارت', 'تحت', 'ضد'
|
33 |
}
|
34 |
|
35 |
-
@st.cache_resource
|
36 |
def load_models():
|
37 |
"""Load and cache the models to prevent reloading"""
|
38 |
tokenizer = AutoTokenizer.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment")
|
|
|
13 |
page_icon="📚",
|
14 |
layout="wide"
|
15 |
)
|
16 |
+
@st.cache_resource
|
17 |
# Add Arabic stop words
|
18 |
ARABIC_STOP_WORDS = {
|
19 |
'في', 'من', 'إلى', 'على', 'عن', 'مع', 'خلال', 'حتى', 'إذا', 'ثم',
|
|
|
32 |
'لازم', 'حاجة', 'علي', 'يجب', 'صار', 'صارت', 'تحت', 'ضد'
|
33 |
}
|
34 |
|
|
|
35 |
def load_models():
|
36 |
"""Load and cache the models to prevent reloading"""
|
37 |
tokenizer = AutoTokenizer.from_pretrained("CAMeL-Lab/bert-base-arabic-camelbert-msa-sentiment")
|