pucardotorg / dristi_experiments

For Pucar Solutions Team
2 stars 4 forks source link

Playground - Optimize number of api calls to WER #37

Open suyashgautam opened 4 months ago

suyashgautam commented 4 months ago

Optimize WER Service Calls and Format WER Percentage Display

Description

Currently, the application is making excessive calls to the Word Error Rate (WER) calculation service, triggering updates every time a character is added or modified. This behavior should be optimized so that the WER calculation is performed only when the user has completed updating the text, rather than for each individual character change.

Additionally, there is an issue where the WER percentage display sometimes shows more than two decimal places. This display should be formatted to consistently show the WER percentage rounded to two decimal places for clarity and consistency.

Also, there is an issue where Transcription Model input border is overlapping with the label of the input. This display should be formatted such that there is no overlap

Tasks

  1. Optimize WER Calculation Trigger:

    • Modify the application logic to trigger the WER calculation service only when the user has finished updating the text input, rather than after each character modification.
  2. Format WER Percentage Display:

    • Adjust the WER percentage display formatting to ensure it consistently shows the percentage rounded to two decimal places.
  3. Transcription Model legend in Transcription page:

    • Fix the border of the Transcription Model input currently it is overlapping with the legend.

Acceptance Criteria

Additional Notes

suyashgautam commented 4 months ago

@biratdatta Can you please work on this issue?

biratdatta commented 4 months ago

https://github.com/pucardotorg/dristi_experiments/pull/39 @suyashgautam

biratdatta commented 4 months ago
  1. Used a debounce function to limit the API calls to the getWordErrorRate function.
  2. Formatted the percentage value of wer to two decimal places.
  3. Fixed the labeling styles to adjust the Transcription Model label to be viewed perfectly