MohamedRashad commited on
Commit
f21842d
Β·
1 Parent(s): 1aa355c

Refactor app.py and utils.py to centralize dataset repository configuration

Browse files
Files changed (2) hide show
  1. app.py +0 -9
  2. utils.py +4 -1
app.py CHANGED
@@ -1,16 +1,7 @@
1
- import os
2
- import json
3
- import numpy as np
4
- import pandas as pd
5
  import gradio as gr
6
- from huggingface_hub import HfApi, hf_hub_download
7
- from pathlib import Path
8
  from utils import submit_gradio_module, load_retrieval_results
9
 
10
 
11
- OWNER = "Navid-AI"
12
- DATASET_REPO_ID = f"{OWNER}/requests-dataset"
13
-
14
  HEADER = """<div style="text-align: center; margin-bottom: 20px;">
15
  <h1>The Arabic RAG Leaderboard</h1>
16
  <p style="font-size: 14px; color: #888;">The only leaderboard you will require for your RAG needs πŸ†</p>
 
 
 
 
 
1
  import gradio as gr
 
 
2
  from utils import submit_gradio_module, load_retrieval_results
3
 
4
 
 
 
 
5
  HEADER = """<div style="text-align: center; margin-bottom: 20px;">
6
  <h1>The Arabic RAG Leaderboard</h1>
7
  <p style="font-size: 14px; color: #888;">The only leaderboard you will require for your RAG needs πŸ†</p>
utils.py CHANGED
@@ -3,10 +3,13 @@ import pandas as pd
3
  import json
4
  import os
5
  from pathlib import Path
6
- from huggingface_hub import HfApi
7
 
8
  api = HfApi()
9
 
 
 
 
10
  def load_retrieval_results():
11
  base_path = Path(__file__).parent
12
  results_dir = base_path / "assets" / "results"
 
3
  import json
4
  import os
5
  from pathlib import Path
6
+ from huggingface_hub import HfApi, hf_hub_download
7
 
8
  api = HfApi()
9
 
10
+ OWNER = "Navid-AI"
11
+ DATASET_REPO_ID = f"{OWNER}/requests-dataset"
12
+
13
  def load_retrieval_results():
14
  base_path = Path(__file__).parent
15
  results_dir = base_path / "assets" / "results"