diff --git a/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.html b/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.html index 16296d9..529eb54 100644 --- a/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.html +++ b/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.html @@ -1,12 +1,12 @@
ANAIZA TEKSTU REKLAMY
- +
Ola J cos tu se wpiszesz albo nie xD
- +
@@ -15,7 +15,7 @@
- +
diff --git a/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.scss b/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.scss index f9de606..92e11be 100644 --- a/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.scss +++ b/src/app/demo-models-page/advertise-analysis/advertise-analysis.component.scss @@ -67,3 +67,18 @@ justify-content: center; 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; + } +} diff --git a/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.html b/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.html index 5b225ba..6458581 100644 --- a/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.html +++ b/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.html @@ -1,12 +1,12 @@
POPRAWIANIE BŁĘDÓW
- +
ja cos tu se wpiszesz albo nie xD
- +
@@ -15,13 +15,16 @@
- +
-
Poprawiony tekst:
-
{{correctedText}}
+ +
Poprawiony tekst:
+
{{correctedText}}
+
@@ -29,3 +32,6 @@
+ +
Wystąpił nieoczekiwany błąd.
+
diff --git a/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.scss b/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.scss index c697f3c..133764a 100644 --- a/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.scss +++ b/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.scss @@ -67,3 +67,20 @@ justify-content: center; 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; + } +} diff --git a/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.ts b/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.ts index d50c5a7..c9fd35f 100644 --- a/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.ts +++ b/src/app/demo-models-page/errors-correction-page/errors-correction-page.component.ts @@ -12,7 +12,8 @@ import { environment } from 'src/environments/environment'; export class ErrorsCorrectionPageComponent implements OnInit { correctedTextLoading = false; - correctedTextSet= false; + correctedTextSet = false; + error = false; correctedText!: string; randomSampleList = [ 'krul wladyslaw jagiello zwyciezyl w bitwie pod grunwaldem', @@ -39,6 +40,7 @@ export class ErrorsCorrectionPageComponent implements OnInit { } correctErrors(isRandomSample: boolean): void { + this.error = false let sentence = '' this.correctedTextSet = true this.correctedTextLoading = false; @@ -53,6 +55,11 @@ export class ErrorsCorrectionPageComponent implements OnInit { next: (resp: any) => { this.correctedText = resp.predictions[0].generated_text this.correctedTextLoading = true; + }, + error: () => { + this.correctedTextLoading = true; + this.error = true + console.log('error') } }) diff --git a/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.html b/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.html index 75f7c19..6c7325e 100644 --- a/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.html +++ b/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.html @@ -1,7 +1,7 @@
ANALIZA POSTA Z FACEBOOKA
- +
cos tu sie wpisze
@@ -11,39 +11,41 @@
-
-
-
Treść posta
-
- {{post}} -
-
-
-
-
Komentarze
-
-
-
{{res.sentence}}
-
-
Negatywny
-
Pozytywny
-
Neutralny
-
+ +
+
Treść posta
+
+ {{post}}
-
-
- - -
-
+
+
+
Komentarze
+
+
+
{{res.sentence}}
+
+
Negatywny
+
Pozytywny
+
Neutralny
+
+
+
+
+
+ + +
+
+
@@ -55,3 +57,7 @@
Nie udało się pobrać komentarzy
+ + +
Wystąpił nieoczekiwany błąd.
+
diff --git a/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.scss b/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.scss index 4f075ae..564c51d 100644 --- a/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.scss +++ b/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.scss @@ -104,3 +104,16 @@ color:white; 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; + } +} diff --git a/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.ts b/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.ts index 7ef2241..911a50c 100644 --- a/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.ts +++ b/src/app/demo-models-page/facebook-analysis/facebook-analysis.component.ts @@ -18,7 +18,8 @@ export class FacebookAnalysisComponent implements OnInit { results: { label: number, score: number, sentence: string }[] = [] analysisStart = false; analysisLoading = false; - commentStatus = false; + commentStatus = true; + error = false; post!: string; public barChartLegend = true; public barChartPlugins = []; @@ -79,6 +80,11 @@ export class FacebookAnalysisComponent implements OnInit { next: () => { console.log(2) this.analysisLoading = true + }, + error: () => { + this.analysisLoading = true + this.error = true + console.log('error') } }) } diff --git a/src/app/demo-models-page/irony-analysis/irony-analysis.component.html b/src/app/demo-models-page/irony-analysis/irony-analysis.component.html index 910793b..f1fd5c7 100644 --- a/src/app/demo-models-page/irony-analysis/irony-analysis.component.html +++ b/src/app/demo-models-page/irony-analysis/irony-analysis.component.html @@ -1,12 +1,12 @@
WYKRYWANIE IRONII
- +
Ola G cos tu se wpiszesz albo nie xD
- +
@@ -21,9 +21,9 @@
- + + class="button-primary irony-btn">Analizuj tekst
diff --git a/src/app/demo-models-page/irony-analysis/irony-analysis.component.scss b/src/app/demo-models-page/irony-analysis/irony-analysis.component.scss index 07defed..bee23ef 100644 --- a/src/app/demo-models-page/irony-analysis/irony-analysis.component.scss +++ b/src/app/demo-models-page/irony-analysis/irony-analysis.component.scss @@ -81,11 +81,26 @@ width: 400px } -.ready-examples-button{ - padding-bottom:20px; +.ready-examples-button { + padding-bottom: 20px; } -.spinner{ +.spinner { display: flex; 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; + } +} diff --git a/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.html b/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.html index 9ad0230..321a1a3 100644 --- a/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.html +++ b/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.html @@ -1,12 +1,12 @@
ANALIZA SENTYMENTU
- +
Maciek cos tu se wpiszesz albo nie xD
- +
@@ -21,28 +21,30 @@
- + + class="button-primary sentiment-btn">Analizuj tekst
-
-
-
{{res.sentence}}
-
-
Negatywny
-
Pozytywny
-
Neutralny
+ +
+
+
{{res.sentence}}
+
+
Negatywny
+
Pozytywny
+
Neutralny
+
-
-
- - -
+
+ + +
+
@@ -58,3 +60,6 @@
+ +
Wystąpił nieoczekiwany błąd.
+
diff --git a/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.scss b/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.scss index 82ba5a3..ab25db7 100644 --- a/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.scss +++ b/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.scss @@ -81,11 +81,30 @@ width: 400px } -.ready-examples-button{ - padding-bottom:20px; +.ready-examples-button { + padding-bottom: 20px; } -.spinner{ +.spinner { display: flex; 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; + } +} diff --git a/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.ts b/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.ts index c1f895a..c551593 100644 --- a/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.ts +++ b/src/app/demo-models-page/sentiment-analysis/sentiment-analysis.component.ts @@ -27,7 +27,8 @@ export class SentimentAnalysisComponent implements OnInit { analysisStart = false; analysisLoading = false; - results: { label: number, score: number, sentence: string }[] = [] + results: { label: number, score: number, sentence: string }[] = []; + error = false; public barChartLegend = true; public barChartPlugins = []; public barChartOptions: ChartConfiguration<'bar'>['options'] = { @@ -68,6 +69,7 @@ export class SentimentAnalysisComponent implements OnInit { } analyzeSentiment(isRandomSample: boolean) { + this.error = false this.analysisStart = true this.analysisLoading = false let sentences = [] @@ -92,6 +94,11 @@ export class SentimentAnalysisComponent implements OnInit { setTimeout(() => { this.duplicateField() }, 50) + }, + error: () => { + this.analysisLoading = true + this.error = true + console.log('error') } }) } diff --git a/src/styles.scss b/src/styles.scss index 1542351..11889e9 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -44,9 +44,13 @@ body { transition: 0.3s; &:hover:enabled { - background-color: white; - color: #0097A7; - border: 2px solid #0097A7; + background-color: rgb(41, 41, 41); + color: #bebebe; + border: 2px solid #9d9d9d; + } + + &:disabled{ + background-color: #869b9d; } &:disabled{