Logo Lanfrica
  • Accueil
  • Atlas
  • Analyses
  • Documentation
  • Sign in

© 2026 Lanfrica. Tous droits réservés. Tous les droits d'auteur des ressources affichées sur le site Web Lanfrica appartiennent aux détenteurs de droits d'auteur d'origine, sauf indication contraire explicite.

Samielakkad/darija-agri-demo

Domaine:

natural language processingagriculture

Type de record:

model
Créateur:
Sam
Hôte:
Gradio demo for a Qwen2.5-VL crop identifier answering in Moroccan Darija, with LoRA adaptation and refusal gating. # Darija Agricultural VLM — demo Gradio demo of a vision-language model that identifies a crop from a photo and answers in Moroccan Darija. Part of my master's work at Tsinghua SIGS on low-resource agricultural advisory. **Model:** Qwen/Qwen2.5-VL-3B-Instruct + the LoRA adapter in `lora_adapter/` (r=8, α=16, attention + MLP projections). The base model downloads from Hugging Face on first run (~6 GB); the adapter ships with the repo. ## What it does - Takes a crop photo, optionally with a crop-identification question in Darija. - Generates a Darija description with greedy decoding and a fixed seed to reduce run-to-run variation. - Matches the generated text against 30 crop classes through an Arabic-normalized alias table (`crop_aliases.json`) — the same matcher used in the eval, not a separate heuristic. - **Refusal gate:** if nothing in the output matches a known crop, the demo answers «مانش متأكد — سول خبير فلاحي» ("not sure — ask an agricultural expert") instead of guessing. - **Crop-only prompt:** the base instruction always limits the model to crop identity and directly visible features. Optional user text is quoted as untrusted context and cannot replace that instruction; disease, pest, treatment, dosage, and unrelated requests are explicitly out of scope. The training/evaluation split and its result artifact are not included in this demo repository, so no adapter accuracy is claimed here. Disease and treatment advice are deliberately absent: nothing in the current training covers them, so the UI pins them as a locked Phase 2 panel rather than letting the model improvise medical-grade advice. The crop-only instruction is a prompt-level scope control, not a medical-safety classifier. Do not use this prototype to make crop-health or treatment decisions, and review model output before showing it in any higher-stakes setting. ## Run it Windows: ```bat setup.bat :: installs torch (cu121) + transformers/peft/gradio/bitsandbytes run.bat ``` Linux / macOS: …

Visit

github.com

Languages

Arabic, Algerian SpokenArabic, Moroccan Spoken

Tags

agriculturedarijagradioloraqwenvision-language-model

Similaires

Samielakkad/darija-toolsSamielakkad/AI-NLP-Darija-ResourcesSamielakkad/AI-NLP-Darija-Classifiermedaminekonyali/wav2vec2-xlsr-tunisian-darija-demomedaminekonyali/wav2vec2-base-tunisian-darija-demobouim/hubert-large-arabic-demo-darija-colab2

Samielakkad/darija-tools

Dependency-free Python utilities for Darija normalization and bidirectional Arabizi transliteration.

Samielakkad/AI-NLP-Darija-Resources

AI + NLP · curated corpora, papers & tools for low-resource Moroccan Arabic (Darija) # AI + NLP · d

Samielakkad/AI-NLP-Darija-Classifier

AI + NLP · production Darija (Moroccan Arabic) intent + city classifier, Hugging Face–ready --- lic

medaminekonyali/wav2vec2-xlsr-tunisian-darija-demo

medaminekonyali/wav2vec2-base-tunisian-darija-demo

bouim/hubert-large-arabic-demo-darija-colab2