Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
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 = """<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 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() | |