error handling button color fix
This commit is contained in:
parent
3fbf4c7edb
commit
67e65a48cb
@ -1,12 +1,12 @@
|
|||||||
<div class="sentiment-container">
|
<div class="sentiment-container">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">ANAIZA TEKSTU REKLAMY</div>
|
<div class="title">ANAIZA TEKSTU REKLAMY</div>
|
||||||
<button (click)="goToMainPage()" class="button-primary main-page-button">strona główna</button>
|
<button (click)="goToMainPage()" class="button-primary main-page-button advertise-btn">strona główna</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text">Ola J cos tu se wpiszesz albo nie xD</div>
|
<div class="text">Ola J cos tu se wpiszesz albo nie xD</div>
|
||||||
<div class="ready-examples-button">
|
<div class="ready-examples-button">
|
||||||
<button (click)="analyseAdvert(true)" class="button-primary">Wyolsuj gotowy przykład</button>
|
<button (click)="analyseAdvert(true)" class="button-primary advertise-btn">Wyolsuj gotowy przykład</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div [formGroup]="errorsForm">
|
<div [formGroup]="errorsForm">
|
||||||
@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button [disabled]="!errorsForm.valid" (click)="analyseAdvert(false)" class="button-primary">Analizuj tekst</button>
|
<button [disabled]="!errorsForm.valid" (click)="analyseAdvert(false)" class="button-primary advertise-btn">Analizuj tekst</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="correctedTextSet" class="corrected-text-container">
|
<div *ngIf="correctedTextSet" class="corrected-text-container">
|
||||||
|
@ -67,3 +67,18 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: 40px
|
padding-top: 40px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.advertise-btn {
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(135, 135, 21) 50%, rgba(0, 0, 0, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(152, 152, 48) 50%, rgba(0, 0, 0, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
background: linear-gradient(35deg, rgba(106, 106, 106, 1) 0%, rgb(166, 166, 166) 50%, rgba(106, 106, 106, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="sentiment-container">
|
<div class="sentiment-container">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">POPRAWIANIE BŁĘDÓW</div>
|
<div class="title">POPRAWIANIE BŁĘDÓW</div>
|
||||||
<button (click)="goToMainPage()" class="button-primary main-page-button">strona główna</button>
|
<button (click)="goToMainPage()" class="button-primary main-page-button error-btn">strona główna</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text">ja cos tu se wpiszesz albo nie xD</div>
|
<div class="text">ja cos tu se wpiszesz albo nie xD</div>
|
||||||
<div class="ready-examples-button">
|
<div class="ready-examples-button">
|
||||||
<button (click)="correctErrors(true)" class="button-primary">Wyolsuj gotowy przykład</button>
|
<button (click)="correctErrors(true)" class="button-primary error-btn">Wyolsuj gotowy przykład</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div [formGroup]="errorsForm">
|
<div [formGroup]="errorsForm">
|
||||||
@ -15,13 +15,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button [disabled]="!errorsForm.valid" (click)="correctErrors(false)" class="button-primary">Popraw tekst</button>
|
<button [disabled]="!errorsForm.valid" (click)="correctErrors(false)" class="button-primary error-btn">Popraw
|
||||||
|
tekst</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="correctedTextSet" class="corrected-text-container">
|
<div *ngIf="correctedTextSet" class="corrected-text-container">
|
||||||
<ng-container *ngIf="correctedTextLoading; else loading">
|
<ng-container *ngIf="correctedTextLoading; else loading">
|
||||||
<div class="corrected-title">Poprawiony tekst:</div>
|
<ng-container *ngIf="!error; else error">
|
||||||
<div class="corrected-text">{{correctedText}}</div>
|
<div class="corrected-title">Poprawiony tekst:</div>
|
||||||
|
<div class="corrected-text">{{correctedText}}</div>
|
||||||
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -29,3 +32,6 @@
|
|||||||
<ng-template #loading>
|
<ng-template #loading>
|
||||||
<div class="spinner"><mat-spinner></mat-spinner></div>
|
<div class="spinner"><mat-spinner></mat-spinner></div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
<ng-template #error>
|
||||||
|
<div class="spinner error">Wystąpił nieoczekiwany błąd.</div>
|
||||||
|
</ng-template>
|
||||||
|
@ -67,3 +67,20 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding-top: 40px
|
padding-top: 40px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-btn{
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(19, 133, 17) 50%, rgba(0, 0, 0, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
&:hover{
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(38, 163, 36) 50%, rgba(0, 0, 0, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
&:disabled{
|
||||||
|
background: linear-gradient(35deg, rgba(106, 106, 106, 1) 0%, rgb(166, 166, 166) 50%, rgba(106, 106, 106, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -12,7 +12,8 @@ import { environment } from 'src/environments/environment';
|
|||||||
export class ErrorsCorrectionPageComponent implements OnInit {
|
export class ErrorsCorrectionPageComponent implements OnInit {
|
||||||
|
|
||||||
correctedTextLoading = false;
|
correctedTextLoading = false;
|
||||||
correctedTextSet= false;
|
correctedTextSet = false;
|
||||||
|
error = false;
|
||||||
correctedText!: string;
|
correctedText!: string;
|
||||||
randomSampleList = [
|
randomSampleList = [
|
||||||
'krul wladyslaw jagiello zwyciezyl w bitwie pod grunwaldem',
|
'krul wladyslaw jagiello zwyciezyl w bitwie pod grunwaldem',
|
||||||
@ -39,6 +40,7 @@ export class ErrorsCorrectionPageComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
correctErrors(isRandomSample: boolean): void {
|
correctErrors(isRandomSample: boolean): void {
|
||||||
|
this.error = false
|
||||||
let sentence = ''
|
let sentence = ''
|
||||||
this.correctedTextSet = true
|
this.correctedTextSet = true
|
||||||
this.correctedTextLoading = false;
|
this.correctedTextLoading = false;
|
||||||
@ -53,6 +55,11 @@ export class ErrorsCorrectionPageComponent implements OnInit {
|
|||||||
next: (resp: any) => {
|
next: (resp: any) => {
|
||||||
this.correctedText = resp.predictions[0].generated_text
|
this.correctedText = resp.predictions[0].generated_text
|
||||||
this.correctedTextLoading = true;
|
this.correctedTextLoading = true;
|
||||||
|
},
|
||||||
|
error: () => {
|
||||||
|
this.correctedTextLoading = true;
|
||||||
|
this.error = true
|
||||||
|
console.log('error')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<div class="facebook-analysis-container">
|
<div class="facebook-analysis-container">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">ANALIZA POSTA Z FACEBOOKA</div>
|
<div class="title">ANALIZA POSTA Z FACEBOOKA</div>
|
||||||
<button (click)="goToMainPage()" class="button-primary main-page-button">strona główna</button>
|
<button (click)="goToMainPage()" class="button-primary main-page-button face-btn">strona główna</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="text">cos tu sie wpisze</div>
|
<div class="text">cos tu sie wpisze</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
@ -11,39 +11,41 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button [disabled]="!linkForm.valid" (click)="getComments()" class="button-primary">Analizuj
|
<button [disabled]="!linkForm.valid" (click)="getComments()" class="button-primary face-btn">Analizuj
|
||||||
komentarze</button>
|
komentarze</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="results-table" *ngIf="analysisStart">
|
<div class="results-table" *ngIf="analysisStart">
|
||||||
<ng-container *ngIf="analysisLoading; else loading">
|
<ng-container *ngIf="analysisLoading; else loading">
|
||||||
<ng-container *ngIf="commentStatus; else commentError">
|
<ng-container *ngIf="commentStatus; else commentError">
|
||||||
<div class="info-container">
|
<ng-container *ngIf="!error; else error">
|
||||||
<div class="post-title">Treść posta</div>
|
<div class="info-container">
|
||||||
<div class="post">
|
<div class="post-title">Treść posta</div>
|
||||||
{{post}}
|
<div class="post">
|
||||||
</div>
|
{{post}}
|
||||||
</div>
|
|
||||||
<div class="analysis-results">
|
|
||||||
<div>
|
|
||||||
<div class="post-title">Komentarze</div>
|
|
||||||
<div *ngFor="let res of results">
|
|
||||||
<div class="result-row">
|
|
||||||
<div class="sentence">{{res.sentence}}</div>
|
|
||||||
<div [ngSwitch]="res.label">
|
|
||||||
<div class="label-0" *ngSwitchCase="0">Negatywny</div>
|
|
||||||
<div class="label-1" *ngSwitchCase="1">Pozytywny</div>
|
|
||||||
<div class="label-2" *ngSwitchCase="2">Neutralny</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="analysis-results">
|
||||||
<div class="chart">
|
<div>
|
||||||
<canvas baseChart width="300" height="300" [data]="barChartData" [options]="barChartOptions"
|
<div class="post-title">Komentarze</div>
|
||||||
[plugins]="barChartPlugins" [legend]="barChartLegend" [type]="'bar'">
|
<div *ngFor="let res of results">
|
||||||
</canvas>
|
<div class="result-row">
|
||||||
</div>
|
<div class="sentence">{{res.sentence}}</div>
|
||||||
</div>
|
<div [ngSwitch]="res.label">
|
||||||
|
<div class="label-0" *ngSwitchCase="0">Negatywny</div>
|
||||||
|
<div class="label-1" *ngSwitchCase="1">Pozytywny</div>
|
||||||
|
<div class="label-2" *ngSwitchCase="2">Neutralny</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="chart">
|
||||||
|
<canvas baseChart width="300" height="300" [data]="barChartData" [options]="barChartOptions"
|
||||||
|
[plugins]="barChartPlugins" [legend]="barChartLegend" [type]="'bar'">
|
||||||
|
</canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
@ -55,3 +57,7 @@
|
|||||||
<ng-template #commentError>
|
<ng-template #commentError>
|
||||||
<div class="comment-error">Nie udało się pobrać komentarzy</div>
|
<div class="comment-error">Nie udało się pobrać komentarzy</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
|
<ng-template #error>
|
||||||
|
<div class="comment-error">Wystąpił nieoczekiwany błąd.</div>
|
||||||
|
</ng-template>
|
||||||
|
@ -104,3 +104,16 @@
|
|||||||
color:white;
|
color:white;
|
||||||
font-size:20px
|
font-size:20px
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.face-btn{
|
||||||
|
background: linear-gradient(35deg, rgb(34, 34, 34) 0%, rgb(20, 43, 159) 50%, rgb(46, 46, 46) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
&:hover{
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(52, 77, 200) 50%, rgba(0, 0, 0, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
&:disabled{
|
||||||
|
background: linear-gradient(35deg, rgba(106, 106, 106, 1) 0%, rgb(166, 166, 166) 50%, rgba(106, 106, 106, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -18,7 +18,8 @@ export class FacebookAnalysisComponent implements OnInit {
|
|||||||
results: { label: number, score: number, sentence: string }[] = []
|
results: { label: number, score: number, sentence: string }[] = []
|
||||||
analysisStart = false;
|
analysisStart = false;
|
||||||
analysisLoading = false;
|
analysisLoading = false;
|
||||||
commentStatus = false;
|
commentStatus = true;
|
||||||
|
error = false;
|
||||||
post!: string;
|
post!: string;
|
||||||
public barChartLegend = true;
|
public barChartLegend = true;
|
||||||
public barChartPlugins = [];
|
public barChartPlugins = [];
|
||||||
@ -79,6 +80,11 @@ export class FacebookAnalysisComponent implements OnInit {
|
|||||||
next: () => {
|
next: () => {
|
||||||
console.log(2)
|
console.log(2)
|
||||||
this.analysisLoading = true
|
this.analysisLoading = true
|
||||||
|
},
|
||||||
|
error: () => {
|
||||||
|
this.analysisLoading = true
|
||||||
|
this.error = true
|
||||||
|
console.log('error')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="sentiment-container">
|
<div class="sentiment-container">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">WYKRYWANIE IRONII</div>
|
<div class="title">WYKRYWANIE IRONII</div>
|
||||||
<button (click)="goToMainPage()" class="button-primary main-page-button">strona główna</button>
|
<button (click)="goToMainPage()" class="button-primary main-page-button irony-btn">strona główna</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text">Ola G cos tu se wpiszesz albo nie xD</div>
|
<div class="text">Ola G cos tu se wpiszesz albo nie xD</div>
|
||||||
<div class="ready-examples-button">
|
<div class="ready-examples-button">
|
||||||
<button (click)="analyzeSentiment(true)" class="button-primary">Wyolsuj gotowe przykłady</button>
|
<button (click)="analyzeSentiment(true)" class="button-primary irony-btn">Wyolsuj gotowe przykłady</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
@ -21,9 +21,9 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button (click)="duplicateField()" class="button-primary">Dodaj pole</button>
|
<button (click)="duplicateField()" class="button-primary irony-btn">Dodaj pole</button>
|
||||||
<button [disabled]="!sentimentForm.valid" (click)="analyzeSentiment(false)"
|
<button [disabled]="!sentimentForm.valid" (click)="analyzeSentiment(false)"
|
||||||
class="button-primary">Analizuj tekst</button>
|
class="button-primary irony-btn">Analizuj tekst</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="results-table" *ngIf="analysisStart">
|
<div class="results-table" *ngIf="analysisStart">
|
||||||
|
@ -81,11 +81,26 @@
|
|||||||
width: 400px
|
width: 400px
|
||||||
}
|
}
|
||||||
|
|
||||||
.ready-examples-button{
|
.ready-examples-button {
|
||||||
padding-bottom:20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner{
|
.spinner {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.irony-btn {
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(134, 18, 122) 50%, rgba(0, 0, 0, 1) 100%);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(160, 47, 149) 50%, rgba(0, 0, 0, 1) 100%);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
background: linear-gradient(35deg, rgba(106, 106, 106, 1) 0%, rgb(166, 166, 166) 50%, rgba(106, 106, 106, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
<div class="sentiment-container">
|
<div class="sentiment-container">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">ANALIZA SENTYMENTU</div>
|
<div class="title">ANALIZA SENTYMENTU</div>
|
||||||
<button (click)="goToMainPage()" class="button-primary main-page-button">strona główna</button>
|
<button (click)="goToMainPage()" class="button-primary main-page-button sentiment-btn">strona główna</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text">Maciek cos tu se wpiszesz albo nie xD</div>
|
<div class="text">Maciek cos tu se wpiszesz albo nie xD</div>
|
||||||
<div class="ready-examples-button">
|
<div class="ready-examples-button">
|
||||||
<button (click)="analyzeSentiment(true)" class="button-primary">Wyolsuj gotowe przykłady</button>
|
<button (click)="analyzeSentiment(true)" class="button-primary sentiment-btn">Wyolsuj gotowe przykłady</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-container">
|
<div class="form-container">
|
||||||
<div class="form">
|
<div class="form">
|
||||||
@ -21,28 +21,30 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-container">
|
<div class="button-container">
|
||||||
<button (click)="duplicateField()" class="button-primary">Dodaj pole</button>
|
<button (click)="duplicateField()" class="button-primary sentiment-btn">Dodaj pole</button>
|
||||||
<button [disabled]="!sentimentForm.valid" (click)="analyzeSentiment(false)"
|
<button [disabled]="!sentimentForm.valid" (click)="analyzeSentiment(false)"
|
||||||
class="button-primary">Analizuj tekst</button>
|
class="button-primary sentiment-btn">Analizuj tekst</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="results-table" *ngIf="analysisStart">
|
<div class="results-table" *ngIf="analysisStart">
|
||||||
<ng-container *ngIf="analysisLoading; else loading">
|
<ng-container *ngIf="analysisLoading; else loading">
|
||||||
<div *ngFor="let res of results">
|
<ng-container *ngIf="!error; else error">
|
||||||
<div class="result-row">
|
<div *ngFor="let res of results">
|
||||||
<div class="sentence">{{res.sentence}}</div>
|
<div class="result-row">
|
||||||
<div [ngSwitch]="res.label">
|
<div class="sentence">{{res.sentence}}</div>
|
||||||
<div class="label-0" *ngSwitchCase="0">Negatywny</div>
|
<div [ngSwitch]="res.label">
|
||||||
<div class="label-1" *ngSwitchCase="1">Pozytywny</div>
|
<div class="label-0" *ngSwitchCase="0">Negatywny</div>
|
||||||
<div class="label-2" *ngSwitchCase="2">Neutralny</div>
|
<div class="label-1" *ngSwitchCase="1">Pozytywny</div>
|
||||||
|
<div class="label-2" *ngSwitchCase="2">Neutralny</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="chart">
|
||||||
<div class="chart">
|
<canvas baseChart width="300" height="300" [data]="barChartData" [options]="barChartOptions"
|
||||||
<canvas baseChart width="300" height="300" [data]="barChartData" [options]="barChartOptions"
|
[plugins]="barChartPlugins" [legend]="barChartLegend" [type]="'bar'">
|
||||||
[plugins]="barChartPlugins" [legend]="barChartLegend" [type]="'bar'">
|
</canvas>
|
||||||
</canvas>
|
</div>
|
||||||
</div>
|
</ng-container>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -58,3 +60,6 @@
|
|||||||
<ng-template #loading>
|
<ng-template #loading>
|
||||||
<div class="spinner"><mat-spinner></mat-spinner></div>
|
<div class="spinner"><mat-spinner></mat-spinner></div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
<ng-template #error>
|
||||||
|
<div class="spinner error">Wystąpił nieoczekiwany błąd.</div>
|
||||||
|
</ng-template>
|
||||||
|
@ -81,11 +81,30 @@
|
|||||||
width: 400px
|
width: 400px
|
||||||
}
|
}
|
||||||
|
|
||||||
.ready-examples-button{
|
.ready-examples-button {
|
||||||
padding-bottom:20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner{
|
.spinner {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error {
|
||||||
|
color: white
|
||||||
|
}
|
||||||
|
|
||||||
|
.sentiment-btn {
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(20, 123, 137) 50%, rgba(0, 0, 0, 1) 100%);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: linear-gradient(35deg, rgba(0, 0, 0, 1) 0%, rgb(64, 164, 177) 50%, rgba(0, 0, 0, 1) 100%);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled {
|
||||||
|
background: linear-gradient(35deg, rgba(106, 106, 106, 1) 0%, rgb(166, 166, 166) 50%, rgba(106, 106, 106, 1) 100%) !important;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -27,7 +27,8 @@ export class SentimentAnalysisComponent implements OnInit {
|
|||||||
|
|
||||||
analysisStart = false;
|
analysisStart = false;
|
||||||
analysisLoading = false;
|
analysisLoading = false;
|
||||||
results: { label: number, score: number, sentence: string }[] = []
|
results: { label: number, score: number, sentence: string }[] = [];
|
||||||
|
error = false;
|
||||||
public barChartLegend = true;
|
public barChartLegend = true;
|
||||||
public barChartPlugins = [];
|
public barChartPlugins = [];
|
||||||
public barChartOptions: ChartConfiguration<'bar'>['options'] = {
|
public barChartOptions: ChartConfiguration<'bar'>['options'] = {
|
||||||
@ -68,6 +69,7 @@ export class SentimentAnalysisComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
analyzeSentiment(isRandomSample: boolean) {
|
analyzeSentiment(isRandomSample: boolean) {
|
||||||
|
this.error = false
|
||||||
this.analysisStart = true
|
this.analysisStart = true
|
||||||
this.analysisLoading = false
|
this.analysisLoading = false
|
||||||
let sentences = []
|
let sentences = []
|
||||||
@ -92,6 +94,11 @@ export class SentimentAnalysisComponent implements OnInit {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.duplicateField()
|
this.duplicateField()
|
||||||
}, 50)
|
}, 50)
|
||||||
|
},
|
||||||
|
error: () => {
|
||||||
|
this.analysisLoading = true
|
||||||
|
this.error = true
|
||||||
|
console.log('error')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,13 @@ body {
|
|||||||
transition: 0.3s;
|
transition: 0.3s;
|
||||||
|
|
||||||
&:hover:enabled {
|
&:hover:enabled {
|
||||||
background-color: white;
|
background-color: rgb(41, 41, 41);
|
||||||
color: #0097A7;
|
color: #bebebe;
|
||||||
border: 2px solid #0097A7;
|
border: 2px solid #9d9d9d;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:disabled{
|
||||||
|
background-color: #869b9d;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:disabled{
|
&:disabled{
|
||||||
|
Loading…
Reference in New Issue
Block a user