Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,7 @@ try:
|
|
| 25 |
# Roman Urdu sentiment model
|
| 26 |
roman_urdu_model = pipeline(
|
| 27 |
"sentiment-analysis",
|
| 28 |
-
model="tahamueed23/
|
| 29 |
)
|
| 30 |
|
| 31 |
# Language detection model
|
|
@@ -96,9 +96,7 @@ def detect_language_advanced(text):
|
|
| 96 |
lang_map = {
|
| 97 |
'UR': 'Urdu',
|
| 98 |
'EN': 'English',
|
| 99 |
-
'
|
| 100 |
-
'AR': 'English', # Arabic script
|
| 101 |
-
'FA': 'English' # Farsi
|
| 102 |
}
|
| 103 |
|
| 104 |
detected_lang = lang_map.get(lang_label, 'English')
|
|
|
|
| 25 |
# Roman Urdu sentiment model
|
| 26 |
roman_urdu_model = pipeline(
|
| 27 |
"sentiment-analysis",
|
| 28 |
+
model="tahamueed23/roman-urdu-sentiment"
|
| 29 |
)
|
| 30 |
|
| 31 |
# Language detection model
|
|
|
|
| 96 |
lang_map = {
|
| 97 |
'UR': 'Urdu',
|
| 98 |
'EN': 'English',
|
| 99 |
+
'Ro-Ur': 'English', # Hindi often mixed with Roman Urdu
|
|
|
|
|
|
|
| 100 |
}
|
| 101 |
|
| 102 |
detected_lang = lang_map.get(lang_label, 'English')
|