ramysaidagieb commited on
Commit
1880a37
ยท
verified ยท
1 Parent(s): c0b2a4d

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -12
README.md CHANGED
@@ -1,19 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
1
  # ๐Ÿง  Arabic RAG System with DSPy + Gradio
2
 
3
  This is a full Hugging Face Space project that allows:
4
- - Uploading Arabic PDF documents.
5
- - Storing and indexing chunks using ChromaDB.
6
- - Asking questions and generating answers using DSPy with context retrieval.
7
- - Improving answer accuracy using MIPROv2 optimization based on train/val sets.
8
 
9
- ## ๐Ÿš€ Usage
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
- 1. Upload one or more Arabic PDFs.
12
- 2. Ask a question in Arabic.
13
- 3. Optionally upload `trainset.jsonl` and `valset.jsonl` to fine-tune the DSPy RAG module.
14
 
15
- ## ๐Ÿ“ Files
16
 
17
- - `app.py` โ€” Main code
18
- - `requirements.txt` โ€” Dependencies
19
- - `trainset.jsonl` / `valset.jsonl` โ€” Example training and validation sets
 
1
+ ---
2
+ title: Arabic RAG with DSPy
3
+ emoji: ๐Ÿง 
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: "4.25.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
  # ๐Ÿง  Arabic RAG System with DSPy + Gradio
13
 
14
  This is a full Hugging Face Space project that allows:
 
 
 
 
15
 
16
+ - ๐Ÿงพ Uploading Arabic PDF documents.
17
+ - ๐Ÿง  Storing and indexing chunks using ChromaDB and SentenceTransformers.
18
+ - โ“ Asking questions and generating answers using DSPy with context retrieval.
19
+ - โš™๏ธ Improving answer accuracy using MIPROv2 optimization based on `trainset.jsonl` and `valset.jsonl`.
20
+
21
+ ---
22
+
23
+ ## ๐Ÿš€ How to Use
24
+
25
+ 1. Go to the **"๐Ÿ“ฅ ุชุญู…ูŠู„ ูˆุชุฎุฒูŠู†"** tab to upload your Arabic PDF file.
26
+ 2. Go to the **"โ“ ุณุคุงู„"** tab to type a question.
27
+ 3. (Optional) Go to the **"โš™๏ธ ุชุญุณูŠู† ุงู„ู†ู…ูˆุฐุฌ"** tab to upload training and validation sets for improving answer accuracy.
28
+
29
+ ---
30
+
31
+ ## ๐Ÿ“ Project Structure
32
+
33
+ | File | Description |
34
+ |-------------------|---------------------------------------------------------|
35
+ | `app.py` | Main Gradio interface and DSPy logic |
36
+ | `requirements.txt`| Python dependencies |
37
+ | `trainset.jsonl` | Example training data (question/answer pairs) |
38
+ | `valset.jsonl` | Example validation data (question/answer pairs) |
39
+
40
+ ---
41
+
42
+ ## โœจ Notes
43
+
44
+ - This project supports full Arabic interaction and is optimized for educational and research purposes.
45
+ - You can use any Arabic-compatible LLM via DSPy (e.g., OpenAI, OpenChat, Mistral).
46
 
47
+ ---
 
 
48
 
49
+ ## ๐Ÿ“š Resources
50
 
51
+ - [DSPy Official Documentation](https://dspy.ai)
52
+ - [Gradio Docs](https://www.gradio.app)
53
+ - [Hugging Face Spaces Guide](https://huggingface.co/docs/hub/spaces)