Skip to content

Commit c88637c

Browse files
add deployment logic
1 parent 208e199 commit c88637c

File tree

7 files changed

+1179
-213
lines changed

7 files changed

+1179
-213
lines changed

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"core-js": "2.6.3",
3737
"d3": "^5.9.2",
3838
"file-saver": "^2.0.5",
39+
"jquery": "^3.6.1",
3940
"keyword-extractor": "0.0.25",
4041
"lodash": "^4.17.21",
4142
"madr": "2.1.2",
@@ -49,6 +50,7 @@
4950
"rxjs": "6.5.5",
5051
"simplemde": "1.11.2",
5152
"tslib": "^1.10.0",
53+
"whatwg-fetch": "^3.6.2",
5254
"zone.js": "~0.10.3"
5355
},
5456
"devDependencies": {
Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
<button mat-icon-button class="close-button" (click)="closeDialog2()">
2-
<mat-icon class="close-icon" >close</mat-icon>
2+
<mat-icon class="close-icon">close</mat-icon>
33
</button>
4+
45
<div mat-dialog-content>
56
<mat-form-field id="type-field" class="action-button-with-margin" [floatLabel]="'always'">
67
<mat-label>Input the known Information</mat-label>
78
<textarea matInput placeholder="Type in information" [formControl]="inputfield" cdkFocusInitial></textarea>
8-
</mat-form-field>
9+
</mat-form-field>
910
</div>
11+
1012
<div mat-dialog-content *ngIf="showRephrasedInput">
11-
<p>Rephrased input: {{rephrasedInput}} </p>
13+
<p>Rephrased input: {{rephrasedInput}}</p>
1214
</div>
15+
1316
<div mat-dialog-content *ngIf="showMatchingResults">
14-
<p>The best matching algorithm with cosine similarity is <span class="resultLink"(click)="openLink()">{{resultAlgorithm.name}}</span>. </p>
15-
<p>The Cosine Similarity is <span class="similarityvalue">{{resultAlgorithm.cosineSimilarity}}</span> </p>
17+
<p>The best matching algorithm with cosine similarity is
18+
<span class="resultLink" (click)="openLink()">{{resultAlgorithm.name}}</span>.
19+
</p>
20+
<p>The Cosine Similarity is
21+
<span class="similarityvalue">{{resultAlgorithm.cosineSimilarity}}</span>
22+
</p>
1623
</div>
24+
1725
<div>
1826
<mat-form-field *ngIf="showMatchingResults">
1927
<mat-label>Number of displayed algorithms</mat-label>
@@ -22,11 +30,14 @@
2230
</mat-select>
2331
</mat-form-field>
2432
</div>
33+
2534
<div>
2635
<mat-table #table [dataSource]="tabledata" *ngIf="showMatchingResults">
2736
<ng-container matColumnDef="name">
2837
<mat-header-cell *matHeaderCellDef> Name </mat-header-cell>
29-
<mat-cell *matCellDef="let result"> <span class="resultLink"(click)="openLink2(result.name)">{{result.name}}</span> </mat-cell>
38+
<mat-cell *matCellDef="let result">
39+
<span class="resultLink" (click)="openLink2(result.name)">{{result.name}}</span>
40+
</mat-cell>
3041
</ng-container>
3142
<ng-container matColumnDef="cosineSimilarity">
3243
<mat-header-cell *matHeaderCellDef> Cosine similarity </mat-header-cell>
@@ -36,38 +47,57 @@
3647
<mat-row *matRowDef="let row; columns: columnsToDisplay"></mat-row>
3748
</mat-table>
3849
</div>
50+
3951
<div mat-dialog-actions>
40-
<button class="action-button-with-margin" (click)="closeDialog2()" mat-raised-button >
52+
<button class="action-button-with-margin" (click)="closeDialog2()" mat-raised-button>
4153
<i class="material-icons"></i> close
4254
</button>
43-
<button class="action-button-with-margin" (click)="extractInformation(false) "mat-raised-button>
55+
56+
<button class="action-button-with-margin" (click)="extractInformation(false)" mat-raised-button>
4457
<i class="material-icons"></i> start textmatching
4558
</button>
46-
<button class="action-button-with-margin" (click)="extractInformation(true) "mat-raised-button>
59+
60+
<button class="action-button-with-margin" (click)="extractInformation(true)" mat-raised-button>
4761
<i class="material-icons"></i> start textmatching with rake
4862
</button>
49-
<section class="testsection">
50-
<input type="checkbox" class="example-margin" [checked]="checked" (change)="checkboxClicked($event)">rephrase Problem using OpenAI
63+
64+
<section class="testsection">
65+
<input type="checkbox" class="example-margin" [checked]="checked" (change)="checkboxClicked($event)">
66+
rephrase Problem using OpenAI
5167
</section>
68+
69+
<!-- New buttons for Aggregate and Deploy -->
70+
<button class="action-button-with-margin" (click)="aggregateSolutions()" mat-raised-button>
71+
Aggregate Solutions
72+
</button>
73+
74+
<button class="action-button-with-margin" [disabled]="!isAggregationComplete" (click)="deploySolution()" mat-raised-button>
75+
Deploy Solution
76+
</button>
5277
</div>
78+
79+
<!-- Styling -->
5380
<style>
5481
.resultLink {
55-
cursor: pointer;
56-
color: blue;
82+
cursor: pointer;
83+
color: blue;
5784
}
5885

5986
.resultLink:hover {
60-
opacity: 0.9;
61-
color: pink;
62-
text-decoration: underline;
87+
opacity: 0.9;
88+
color: pink;
89+
text-decoration: underline;
6390
}
6491

6592
.similarityvalue {
66-
color: red;
93+
color: red;
6794
}
6895

6996
.example-margin:hover {
70-
color: blue;
97+
color: blue;
7198
}
7299

100+
.action-button-with-margin {
101+
margin-right: 10px;
102+
}
73103
</style>

0 commit comments

Comments
 (0)