rtetley commited on
Commit
41b134b
·
1 Parent(s): 40a9a5d

fix(auth): reconnect auth system with local app

Browse files

In the final version this will need to be connected to the client id of the
bot we created.

backend/app/config/base.py CHANGED
@@ -20,7 +20,8 @@ HAS_HIGHER_RATE_LIMIT = []
20
 
21
  # HuggingFace configuration
22
  HF_TOKEN = os.environ.get("HF_TOKEN")
23
- HF_ORGANIZATION = "fr-gouv-coordination-ia"
 
24
  API = {
25
  "INFERENCE": "https://api-inference.huggingface.co/models",
26
  "HUB": "https://huggingface.co"
 
20
 
21
  # HuggingFace configuration
22
  HF_TOKEN = os.environ.get("HF_TOKEN")
23
+ # HF_ORGANIZATION = "fr-gouv-coordination-ia"
24
+ HF_ORGANIZATION = "rtetley"
25
  API = {
26
  "INFERENCE": "https://api-inference.huggingface.co/models",
27
  "HUB": "https://huggingface.co"
backend/app/config/hf_config.py CHANGED
@@ -8,7 +8,8 @@ from app.core.cache import cache_config
8
  logger = logging.getLogger(__name__)
9
 
10
  # Organization or user who owns the datasets
11
- HF_ORGANIZATION = "fr-gouv-coordination-ia"
 
12
 
13
  # Get HF token directly from environment
14
  HF_TOKEN = os.environ.get("HF_TOKEN")
 
8
  logger = logging.getLogger(__name__)
9
 
10
  # Organization or user who owns the datasets
11
+ # HF_ORGANIZATION = "fr-gouv-coordination-ia"
12
+ HF_ORGANIZATION = "rtetley"
13
 
14
  # Get HF token directly from environment
15
  HF_TOKEN = os.environ.get("HF_TOKEN")
backend/app/services/leaderboard.py CHANGED
@@ -272,6 +272,7 @@ class LeaderboardService:
272
  try:
273
  logger.info(LogFormatter.section("FETCHING LEADERBOARD DATA"))
274
  logger.info(LogFormatter.info(f"Loading dataset from {HF_ORGANIZATION}/contents"))
 
275
 
276
  # TODO: cache
277
  snapshot_download(
 
272
  try:
273
  logger.info(LogFormatter.section("FETCHING LEADERBOARD DATA"))
274
  logger.info(LogFormatter.info(f"Loading dataset from {HF_ORGANIZATION}/contents"))
275
+ print("GETTING FROM %s" % HF_ORGANIZATION)
276
 
277
  # TODO: cache
278
  snapshot_download(
frontend/src/App.jsx CHANGED
@@ -105,7 +105,7 @@ function App() {
105
  ]}
106
  id="fr-header-simple-header-with-service-title-and-tagline"
107
  serviceTagline="Pour une classification des grands modèles de langages sur des problèmes francophones"
108
- serviceTitle="classeur:IA"
109
  navigation={<Navigation />}
110
  />
111
  <Box
 
105
  ]}
106
  id="fr-header-simple-header-with-service-title-and-tagline"
107
  serviceTagline="Pour une classification des grands modèles de langages sur des problèmes francophones"
108
+ serviceTitle="Leaderboard Français des GML"
109
  navigation={<Navigation />}
110
  />
111
  <Box
frontend/src/config/auth.js CHANGED
@@ -1,7 +1,7 @@
1
  export const HF_CONFIG = {
2
- CLIENT_ID: "18fe6b93-6921-444c-9a20-5c22c578f2d8",
3
  STORAGE_KEY: "hf_oauth",
4
  SCOPE: "openid profile",
5
- PROD_URL: "https://open-llm-leaderboard-open-llm-leaderboard.hf.space",
6
  DEV_URL: "http://localhost:7860"
7
  };
 
1
  export const HF_CONFIG = {
2
+ CLIENT_ID: "46c6a915-7089-4f45-a85b-f7020276cb99",
3
  STORAGE_KEY: "hf_oauth",
4
  SCOPE: "openid profile",
5
+ PROD_URL: "https://huggingface.co/spaces/rtetley/llm_leaderboard_fr",
6
  DEV_URL: "http://localhost:7860"
7
  };