Spaces:
Sleeping
Sleeping
push
Browse files
app.py
CHANGED
|
@@ -253,50 +253,29 @@ def get_ai_response(text: str, response_language: str = None) -> str:
|
|
| 253 |
return f"I'm sorry, I couldn't connect to the AI service. You said: '{text}'."
|
| 254 |
|
| 255 |
HAUSA_WORDS = [
|
| 256 |
-
"aikin","manoma","gona","
|
| 257 |
-
"
|
| 258 |
-
"
|
| 259 |
-
"
|
| 260 |
-
"kare","kaza","rago","tunkiya","shanu","kaji","kaza","kifi","kifi","kifi",
|
| 261 |
-
"abinci","ruwa","shayi","kofi","sugar","gishiri","mai","kayan","miya","tuwo",
|
| 262 |
-
"fura","koko","kunu","zobo","fura","koko","kunu","zobo","fura","koko",
|
| 263 |
-
"yaro","yarinya","mutum","mace","yara","mata","maza","dattijo","tsoho","sabon",
|
| 264 |
-
"babba","karami","tsufa","sabon","kyau","mugun","dadi","daci","mai","kyau",
|
| 265 |
-
"ina","wane","me","yaushe","yaya","dom","saboda","tare","da","kuma","amma",
|
| 266 |
-
"ko","idan","sai","har","tun","sai","kafin","bayan","cikin","kan","karkashin",
|
| 267 |
-
"gaban","bayan","tsakanin","tsaye","kwance","hau","sauka","tashi","zauna","tashi"
|
| 268 |
]
|
| 269 |
|
| 270 |
-
YORUBA_WORDS = [
|
| 271 |
-
"
|
| 272 |
-
"
|
| 273 |
"nkan","ti","ni","si","lati","ati","pelu","fun","ninu","lori",
|
| 274 |
-
"
|
| 275 |
-
"sọ","ro","kọ","gbo","ri","mọ","fẹ","nifẹ","fẹran","dara",
|
| 276 |
-
"buburu","tobi","kekere","pupa","funfun","dudu","pọ","diẹ","gbogbo","kan"
|
| 277 |
]
|
| 278 |
|
| 279 |
IGBO_WORDS = [
|
| 280 |
"ugbo","akụkọ","mmiri","ala","ọrụ","ncheta","ọhụrụ","ugwu","nri","ahụhụ",
|
| 281 |
-
"kedu","ka","si","na","bụ","nke","a","na","ọ","bụ","na","n'ime","n'elu","n'okpuru"
|
| 282 |
-
"n'akụkụ","n'ebe","n'ụlọ","n'ọfịs","n'ụlọ","n'ime","n'elu","n'okpuru","n'akụkụ",
|
| 283 |
-
"ọrụ","ugbo","mmiri","ala","nri","ahụhụ","ọhụrụ","ncheta","akụkọ","ugwu"
|
| 284 |
]
|
| 285 |
|
| 286 |
ENGLISH_WORDS = [
|
| 287 |
"farm","farmer","farming","agriculture","crop","crops","plant","plants","seed","seeds",
|
| 288 |
"soil","water","rain","sun","weather","harvest","field","fields","tractor","plow",
|
| 289 |
-
"fertilizer","pesticide","organic","yield","
|
| 290 |
-
"
|
| 291 |
-
"goat","goats","chicken","chickens","pig","pigs","milk","meat","eggs","feed",
|
| 292 |
-
"barn","silo","greenhouse","irrigation","drought","flood","pest","disease","healthy",
|
| 293 |
-
"growth","mature","ripe","planting","sowing","weeding","pruning","spraying","fertilizing",
|
| 294 |
-
"cultivation","cultivate","cultivated","arable","fertile","barren","productive","yield",
|
| 295 |
-
"production","produce","grow","growing","grown","planted","harvested","harvesting",
|
| 296 |
-
"season","seasons","spring","summer","autumn","winter","climate","temperature","humidity",
|
| 297 |
-
"moisture","dry","wet","fertile","nutrients","nutrition","feed","feeding","grazing",
|
| 298 |
-
"pasture","meadow","grass","hay","straw","compost","manure","organic","chemical",
|
| 299 |
-
"sustainable","sustainability","biodiversity","ecosystem","environment","conservation"
|
| 300 |
]
|
| 301 |
|
| 302 |
def detect_language(text: str) -> str:
|
|
|
|
| 253 |
return f"I'm sorry, I couldn't connect to the AI service. You said: '{text}'."
|
| 254 |
|
| 255 |
HAUSA_WORDS = [
|
| 256 |
+
"aikin","manoma","gona","noma","shuka","daji","rani","damina","kasa","ruwa",
|
| 257 |
+
"rana","wata","dare","gari","shinkafa","wake","gyada","abinci","shayi","kofi",
|
| 258 |
+
"yaro","yarinya","mutum","mace","yara","mata","maza","babba","karami","kyau",
|
| 259 |
+
"ina","wane","me","yaushe","yaya","dom","saboda","tare","da","kuma","amma"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 260 |
]
|
| 261 |
|
| 262 |
+
YORUBA_WORDS = [
|
| 263 |
+
"ọkọ","aya","baba","iya","egbon","aburo","omo","ọjọ","ọsẹ","osu",
|
| 264 |
+
"ọdun","owuro","ọsan","alẹ","ile","ita","oja","aso","ounje","ata",
|
| 265 |
"nkan","ti","ni","si","lati","ati","pelu","fun","ninu","lori",
|
| 266 |
+
"wọle","jade","lo","wa","je","mu","sọ","ro","kọ","gbo","ri","mọ"
|
|
|
|
|
|
|
| 267 |
]
|
| 268 |
|
| 269 |
IGBO_WORDS = [
|
| 270 |
"ugbo","akụkọ","mmiri","ala","ọrụ","ncheta","ọhụrụ","ugwu","nri","ahụhụ",
|
| 271 |
+
"kedu","ka","si","na","bụ","nke","a","na","ọ","bụ","na","n'ime","n'elu","n'okpuru"
|
|
|
|
|
|
|
| 272 |
]
|
| 273 |
|
| 274 |
ENGLISH_WORDS = [
|
| 275 |
"farm","farmer","farming","agriculture","crop","crops","plant","plants","seed","seeds",
|
| 276 |
"soil","water","rain","sun","weather","harvest","field","fields","tractor","plow",
|
| 277 |
+
"fertilizer","pesticide","organic","yield","grain","wheat","corn","rice","vegetable",
|
| 278 |
+
"fruit","livestock","cattle","cow","sheep","goat","chicken","pig","milk","meat","eggs"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 279 |
]
|
| 280 |
|
| 281 |
def detect_language(text: str) -> str:
|