Spaces:
Build error
Build error
| title: Arabic RAG with DSPy | |
| emoji: ๐ง | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 5.33.0 | |
| app_file: app.py | |
| pinned: false | |
| # ๐ง Arabic RAG System with DSPy + Gradio | |
| This is a full Hugging Face Space project that allows: | |
| - ๐งพ Uploading Arabic PDF documents. | |
| - ๐ง Storing and indexing chunks using ChromaDB and SentenceTransformers. | |
| - โ Asking questions and generating answers using DSPy with context retrieval. | |
| - โ๏ธ Improving answer accuracy using MIPROv2 optimization based on `trainset.jsonl` and `valset.jsonl`. | |
| --- | |
| ## ๐ How to Use | |
| 1. Go to the **"๐ฅ ุชุญู ูู ูุชุฎุฒูู"** tab to upload your Arabic PDF file. | |
| 2. Go to the **"โ ุณุคุงู"** tab to type a question. | |
| 3. (Optional) Go to the **"โ๏ธ ุชุญุณูู ุงููู ูุฐุฌ"** tab to upload training and validation sets for improving answer accuracy. | |
| --- | |
| ## ๐ Project Structure | |
| | File | Description | | |
| |-------------------|---------------------------------------------------------| | |
| | `app.py` | Main Gradio interface and DSPy logic | | |
| | `requirements.txt`| Python dependencies | | |
| | `trainset.jsonl` | Example training data (question/answer pairs) | | |
| | `valset.jsonl` | Example validation data (question/answer pairs) | | |
| --- | |
| ## โจ Notes | |
| - This project supports full Arabic interaction and is optimized for educational and research purposes. | |
| - You can use any Arabic-compatible LLM via DSPy (e.g., OpenAI, OpenChat, Mistral). | |
| --- | |
| ## ๐ Resources | |
| - [DSPy Official Documentation](https://dspy.ai) | |
| - [Gradio Docs](https://www.gradio.app) | |
| - [Hugging Face Spaces Guide](https://huggingface.co/docs/hub/spaces) |