import { useState } from "react";
import { media } from "./Utils/helper.js";
// import "primereact/resources/themes/lara-light-cyan/theme.css";
import './App.css'
import "primereact/resources/themes/lara-light-cyan/theme.css";
// import "primereact/resources/themes/bootstrap4-light-blue/theme.css"
import axios from "axios";
import {
Routes,
Route,
Navigate,
useLocation
} from "react-router-dom";
import { Home } from "./components/Home";
import { Request } from "./components/Request";
import { Leaderboard } from "./components/Leaderboard";
import Nav from "./styled_components/Nav";
import styled from "styled-components";
import { Toast } from "primereact/toast";
import { React, useRef, useEffect } from "react";
import { useContext } from "react";
import { DataContext } from "./DataContext";
import Logo from "./assets/logo.png"
import Metrics from "./components/Metrics";
import Dataset from "./components/Dataset";
import Contact from "./components/Contact";
import ProgressToast from "./styled_components/ProgressToast";
import SpinnerIcon from "./styled_components/SpinnerIcon";
import { Password } from 'primereact/password';
function App() {
const toast = useRef(null);
const [baseUrl, setBaseUrl] = useState("https://satyamr196-asr-fairbench-sever-v2.hf.space")
// const [baseUrl,setBaseUrl] = useState("http://localhost:7860")
console.log(baseUrl);
const location = useLocation();
const showSucess = () => {//For toast
toast.current.show({ severity: 'success', summary: 'Success', detail: 'Model added to Leaderboard 🤗' });
};
const showError = () => {//For toast
toast.current.show({ severity: 'error', summary: 'Error', detail: 'Error adding model to Leaderboard 🥹' });
};
const showInfo = () => {//For toast
toast.current.show({ severity: 'info', summary: 'Info', detail: 'Model already added to the Leaderboard 🫢' });
};
return (
<>
🎙️ ASR-FAIRBENCH is an open benchmarking platform dedicated to evaluating the fairness and accuracy of Automatic Speech Recognition (ASR) models.
Our mission is to assess ASR models' performance across diverse demographic groups using the Fair Speech Dataset.
Models are ranked based on the Fairness Adjusted Accuracy Score (FAAS), which integrates both Word Error Rate (WER) and a Fairness Score, ensuring that models deliver equitable performance across different accents, genders, and age groups.
Explore the 📈 Metrics tab for details on our evaluation process and visit the 📂 Dataset tab for a summary of the Fair Speech Dataset.
Think your ASR model is both inclusive and high-performing? Put it to the test and claim your spot on the leaderboard! ✨
📄(Paper Link)(Github Link)