import gradio as gr
from retrieval_leaderboard import create_retrieval_tab
from reranking_leaderboard import create_reranking_tab
from llm_in_context_leaderboard import create_llm_in_context_tab
from dotenv import load_dotenv
load_dotenv()
HEADER = """
The Arabic RAG Leaderboard
The only leaderboard you will require for your RAG needs 🏆
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.
For technical details, check our blog post here.
"""
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 main():
with gr.Blocks() as demo:
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,
)
demo.launch()
if __name__ == "__main__":
main()