Skip to content

Commit

Permalink
feat(beta models): add ability to mark models as beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff-arn committed Dec 19, 2019
1 parent 5c50f27 commit da4d125
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/data/beta-models.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
"it-IT_BroadbandModel",
"it-IT_NarrowbandModel",
"nl-NL_NarrowbandModel",
"nl-NL_BroadbandModel"
]
5 changes: 4 additions & 1 deletion views/model-dropdown.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import SpeechToText from 'watson-speech/speech-to-text';
// load time. Once we have a token, this component will automatically fetch the current list
// of models and update the UI if necessary.
import cachedModels from '../src/data/models.json';
import betaModels from '../src/data/beta-models.json';


export class ModelDropdown extends Component {
Expand Down Expand Up @@ -49,7 +50,9 @@ export class ModelDropdown extends Component {
.map(m => (
<option value={m.name} key={m.name}>{m.description.replace(/\.$/, '')}
{' '}
({m.rate / 1000}KHz)
{betaModels.some(b => b === m.name) ? '(Beta)' : ''}
{' '}
({m.rate / 1000}KHz)
</option>));

return (
Expand Down

0 comments on commit da4d125

Please sign in to comment.