File size: 2,112 Bytes
d392fbe
6efebdc
b85d9b0
 
 
 
 
6efebdc
d392fbe
 
 
a40f7ce
d392fbe
a40f7ce
 
 
 
 
d392fbe
 
 
 
 
 
 
fe19b0b
eb50697
 
 
 
 
d392fbe
 
 
b85d9b0
 
 
1aa355c
b85d9b0
d392fbe
fbd0e7d
6efebdc
fbd0e7d
 
6efebdc
b85d9b0
 
6efebdc
 
d392fbe
 
eb50697
d392fbe
 
 
 
 
de145b2
b85d9b0
de145b2
 
d392fbe
b85d9b0
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import gradio as gr
from dotenv import load_dotenv

from llm_in_context_leaderboard import create_llm_in_context_tab
from reranking_leaderboard import create_reranking_tab
from retrieval_leaderboard import create_retrieval_tab

load_dotenv()

HEADER = """<div style="text-align: center; margin-bottom: 20px;">
    <h1>The Arabic RAG Leaderboard</h1>
    <p style="font-size: 16px; color: #888;">The only leaderboard you will require for your RAG needs πŸ†</p>
</div>

This leaderboard presents the first comprehensive benchmark for Arabic RAG systems, evaluating both retrieval and re-ranking components. Our framework combines real-world queries with synthetic contexts in a dynamic evaluation cycle, ensuring fair and robust assessment of Arabic information retrieval systems. 
<br>
<br>
For technical details, check our blog post <a href="https://huggingface.co/blog/Navid-AI/arabic-rag-leaderboard">here</a>.
"""

CITATION_BUTTON_LABEL = """
Copy the following snippet to cite these results
"""

CITATION_BUTTON_TEXT = """
@misc{TARL,
  author = {Mohaned A. Rashad, Hamza Shahid},
  title = {The Arabic RAG Leaderboard},
  year = {2025},
  publisher = {Navid-AI},
  howpublished = "url{https://huggingface.co/spaces/Navid-AI/The-Arabic-Rag-Leaderboard}"
}
"""


def create_app():
    with gr.Blocks() as app:
        gr.HTML(HEADER)

        with gr.Tabs():
            with gr.Tab("πŸ•΅οΈβ€β™‚οΈ Retrieval"):
                create_retrieval_tab()

            with gr.Tab("πŸ“Š Reranking"):
                create_reranking_tab()

            # with gr.Tab("🧠 LLM in Context"):
            #     create_llm_in_context_tab()

            with gr.Row():
                with gr.Accordion("πŸ“™ Citation", open=False):
                    gr.Textbox(
                        value=CITATION_BUTTON_TEXT,
                        label=CITATION_BUTTON_LABEL,
                        lines=20,
                        elem_id="citation-button",
                        show_copy_button=True,
                    )
    return app


if __name__ == "__main__":
    app = create_app()
    app.queue().launch()