diff --git a/web/src/components/Sections/Pricing.jsx b/web/src/components/Sections/Pricing.jsx index fd454b7d..031cb00f 100644 --- a/web/src/components/Sections/Pricing.jsx +++ b/web/src/components/Sections/Pricing.jsx @@ -22,6 +22,9 @@ const useStyles = makeStyles((theme) => ({ labeledCard: { backgroundColor: '#ffff99', // light yellow for labeled }, + unlabeledCard: { + backgroundColor: '#cda5a3', // same as is now for unlabeled + }, circularProgressbar: { height: '150px !important', width: '150px !important', @@ -31,20 +34,14 @@ const useStyles = makeStyles((theme) => ({ fontWeight: 'bold', marginBottom: '20px', }, - subTitle: { - fontStyle: 'italic', - marginBottom: '30px', - }, - paragraph: { - textAlign: 'justify', - marginBottom: '30px', - }, label: { fontSize: '18px', fontWeight: '500', }, })); +const secondsToHours = (seconds) => (seconds / 3600).toFixed(2); + export default function Pricing() { const classes = useStyles(); const [summaryInfo, setSummaryInfo] = useState(null); @@ -55,9 +52,9 @@ export default function Pricing() { const response = await axios.get(`${process.env.REACT_APP_API_DOMAIN_PROD}dataset_insight_info`); const data = response.data; const total = data.total_labeled + data.total_unlabeled; + const totalDuration = data.total_duration_labeled + data.total_duration_unlabeled; data.sumofLabeled = (data.total_labeled / total) * 100; data.sumofUnLabeled = (data.total_unlabeled / total) * 100; - const totalDuration = data.total_duration_labeled + data.total_duration_unlabeled; data.sumofLabeledDuration = (data.total_duration_labeled / totalDuration) * 100; data.sumofUnLabeledDuration = (data.total_duration_unlabeled / totalDuration) * 100; data.progressPercentage = (data.total_duration_validated / totalDuration) * 100; @@ -75,107 +72,159 @@ export default function Pricing() { return ( - - - THE PROJECT - We love Technology - - Welcome to the Albanian Language Transcriber project! Our goal is to develop a functioning Albanian speech-to-text AI model to improve the lives - of Albanians and promote the development of the country. With over 7 million speakers, the Albanian language is an important language with a rich - cultural heritage, yet it currently lacks a speech-to-text tool. By developing this tool, we aim to bring the benefits of speech recognition - technology to Albanian speakers in various fields, including the smartphone, automobile, medical, education, and jurisdiction industries. Our team - is committed to building a high-quality model that achieves an accuracy rate of 80% and makes a meaningful impact on the Albanian community. We - appreciate your support and interest in our project. - - OUR DATASET SO FAR Prod - {summaryInfo && ( - - - - -
- -
- Labeled Data - {`${summaryInfo.total_labeled} / ${total}`} -
-
-
- - - -
- -
- Unlabeled Data - {`${summaryInfo.total_unlabeled} / ${total}`} -
-
-
- - - -
- -
- Progress - {`${summaryInfo.total_duration_validated.toFixed(2)} / ${totalDuration.toFixed(2)} seconds`} -
-
-
- {/* New Cards for Additional Progress Information */} - - - -
- -
- Labeled to Validated - {`${summaryInfo.total_duration_validated.toFixed(2)} / ${summaryInfo.total_duration_labeled.toFixed(2)} seconds`} -
-
-
- {/* Add similar cards for Unlabeled to Labeled and Unlabeled to Validated */} - {/* ... */} -
- )} -
+ + THE PROJECT + We love Technology + + Welcome to the Albanian Language Transcriber project! Our goal is to develop a functioning Albanian speech-to-text AI model to improve the lives + of Albanians and promote the development of the country. With over 7 million speakers, the Albanian language is an important language with a rich + cultural heritage, yet it currently lacks a speech-to-text tool. By developing this tool, we aim to bring the benefits of speech recognition + technology to Albanian speakers in various fields, including the smartphone, automobile, medical, education, and jurisdiction industries. Our team + is committed to building a high-quality model that achieves an accuracy rate of 80% and makes a meaningful impact on the Albanian community. We + appreciate your support and interest in our project. + + OUR DATASET SO FAR Prod + + {/* 1. Card for Labeled Data */} + {summaryInfo && ( + + + + Labeled Data + {`${summaryInfo.total_labeled} entries`} + + + + )} + + {/* 2. Card for Unlabeled Data */} + {summaryInfo && ( + + + + Unlabeled Data + {`${summaryInfo.total_unlabeled} entries`} + + + + )} + + {/* 3. Card for Validated Data */} + {summaryInfo && ( + + + + Validated Data + {`${calculatePercentage(summaryInfo.total_duration_validated, summaryInfo.total_duration_labeled)}% validated`} + + + + )} + + {/* 4. Card for Labeled Data Duration */} + {summaryInfo && ( + + + + Labeled Data Duration + {`${secondsToHours(summaryInfo.total_duration_labeled)} hours`} + + + + )} + + {/* 5. Card for Unlabeled Data Duration */} + {summaryInfo && ( + + + + Unlabeled Data Duration + {`${secondsToHours(summaryInfo.total_duration_unlabeled)} hours`} + + + + )} + + {/* 6. Card for Validated Data Duration */} + {summaryInfo && ( + + + + Validated Data Duration + {`${secondsToHours(summaryInfo.total_duration_validated)} hours`} + + + + )} + + {/* 7. Card for Progress Unlabeled - Labeled */} + {summaryInfo && ( + + + + Progress Unlabeled - Labeled +
+ +
+
+
+
+ )} + + {/* 8. Card for Progress Labeled - Validated */} + {summaryInfo && ( + + + + Progress Labeled - Validated +
+ +
+
+
+
+ )} + + {/* 9. Card for Progress Unlabeled - Validated */} + {summaryInfo && ( + + + + Progress Unlabeled - Validated +
+ +
+
+
+
+ )}
);