Skip to content

Commit

Permalink
Add an "empty state" interstitial to LM salience module.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 610787648
  • Loading branch information
iftenney authored and LIT team committed Feb 27, 2024
1 parent 01fcee7 commit 62f18b2
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion lit_nlp/client/modules/lm_salience_module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import '@material/mwc-icon';
import '../elements/color_legend';
import '../elements/interstitial';
import '../elements/numeric_input';
import '../elements/fused_button_bar';

Expand Down Expand Up @@ -852,8 +853,18 @@ export class LMSalienceModule extends SingleExampleSingleModelModule {
</div>`;
}

renderNoExampleInterstitial() {
// prettier-ignore
return html`
<lit-interstitial headline="Sequence Salience">
Enter a prompt in the Editor or select an example from the Data Table to begin.
</lit-interstitial>`;
}

renderContent() {
if (this.currentData == null) return null;
if (this.currentData == null) {
return this.renderNoExampleInterstitial();
}

if (this.salienceTargetOption === undefined) {
return this.renderTargetSelectorInterstitial();
Expand Down

0 comments on commit 62f18b2

Please sign in to comment.