Skip to content

Commit

Permalink
feat: artifact adds model type
Browse files Browse the repository at this point in the history
Signed-off-by: zhaoxinxin <[email protected]>
  • Loading branch information
Liam-Zhao committed Mar 6, 2025
1 parent c218738 commit 4bb64f1
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 68 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="row content-wrapper" *ngIf="!loading">
<div class="col-md-8 md-container pl-1">
<div class="col-md-8 md-container">
<div *ngIf="filesList && filesList.length > 0" class="md-div">
<clr-tree>
<clr-tree-node
Expand Down Expand Up @@ -29,7 +29,7 @@
</clr-tree-node>
</clr-tree>
</div>
<div *ngIf="filesList && filesList.length === 0">
<div class="pl-1" *ngIf="filesList && filesList.length === 0">
{{ 'ARTIFACT.NO_FILES' | translate }}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.content-wrapper {
margin-top: 20px;
padding: 0 0 0 15px;

.md-container {
border: solid 1px #ddd;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
<div class="row content-wrapper" *ngIf="!loading">
<div class="col-md-8 md-container pl-1">
<div
*ngIf="license"
class="md-div"
[innerHTML]="license | markdown"></div>
<div *ngIf="!license">{{ 'ARTIFACT.NO_LICENSE' | translate }}</div>
<div class="col-md-8">
<div class="col-xs-8">
<div
*ngIf="license"
class="yaml-container"
[innerHTML]="license | language | markdown"></div>
</div>
<div class="md-container pl-1" *ngIf="!license">
{{ 'ARTIFACT.NO_LICENSE' | translate }}
</div>
</div>
</div>
<div *ngIf="loading" class="clr-row mt-3 center">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
.content-wrapper {
margin-top: 20px;
padding: 0 0 0 15px;


.md-container {
border: solid 1px #ddd;
border: solid 1px #ddd;
}
}
.center {
}

.center {
justify-content: center;
align-items: center;
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
.content-wrapper {
margin-top: 20px;
padding: 0 0 0 15px;
margin-top: 20px;

.md-container {
border: solid 1px #ddd;
}
.md-container {
border: solid 1px #ddd;
}
}

.center {
justify-content: center;
align-items: center;
}
justify-content: center;
align-items: center;
}
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
<div class="artifact-label" *ngIf="type === 'MODEL'">
<div class="label" *ngIf="artifactExtraAttrs.config.architecture">
<img
*ngIf="
artifactExtraAttrs.config.architecture === 'diffusers' ||
artifactExtraAttrs.config.architecture === 'transformer'
"
[src]="
artifactExtraAttrs.config.architecture === 'safetensor'
? 'images/artifact-label-safetensor.svg'
: 'images/artifact-label-transformer.svg'
artifactExtraAttrs.config.architecture === 'transformer'
? 'images/artifact-label-transformer.svg'
: 'images/artifact-label-diffusers.svg'
"
class="artifact-icon" />

<span>{{ artifactExtraAttrs.config.architecture }}</span>
</div>
<div class="label" *ngIf="artifactExtraAttrs.config.format">
<img
[src]="'images/artifact-label-tensorflow.svg'"
*ngIf="
artifactExtraAttrs.config.format === 'tensorflow' ||
artifactExtraAttrs.config.format === 'safetensors'
"
[src]="
artifactExtraAttrs.config.format === 'tensorflow'
? 'images/artifact-label-tensorflow.svg'
: 'images/artifact-label-safetensor.svg'
"
class="artifact-icon" />
<span>{{ artifactExtraAttrs.config.format }}</span>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@
.label {
display: inline-flex;
align-items: center;
border: 1px solid #fff;
border-radius: 5px;
border: 1px solid var(--clr-color-neutral-500);
border-radius: 8px;
padding: 10px 8px;
background-color: var(--clr-color-action-600);
margin-right: 16px;
margin-right: 8px;
color: #fff;
font-size: 14px;
height: calc(4px * 7);
}

.artifact-icon {
width: 14px;
height: 14px;
margin-right: 6px;
width: 16px;
height: 16px;
margin-right: 4px;
}
}
2 changes: 1 addition & 1 deletion src/portal/src/i18n/lang/de-de-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@
"SCAN_UNSUPPORTED": "Nicht unterstützt",
"SBOM_UNSUPPORTED": "Unsupported",
"SUMMARY": "Zusammenfassung",
"LICENSE": "License",
"LICENSE": "Licen",
"FILES": "Files",
"DEPENDENCIES": "Dependencies",
"VALUES": "Values",
Expand Down
2 changes: 1 addition & 1 deletion src/portal/src/i18n/lang/en-us-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1173,7 +1173,7 @@
"SCAN_UNSUPPORTED": "Unsupported",
"SBOM_UNSUPPORTED": "Unsupported",
"SUMMARY": "Summary",
"LICENSE": "License",
"LICENSE": "Licen",
"FILES": "Files",
"DEPENDENCIES": "Dependencies",
"VALUES": "Values",
Expand Down
2 changes: 1 addition & 1 deletion src/portal/src/i18n/lang/es-es-lang.json
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@
"SCAN_UNSUPPORTED": "No soportado",
"SBOM_UNSUPPORTED": "No soportado",
"SUMMARY": "Resumen",
"LICENSE": "License",
"LICENSE": "Licen",
"FILES": "Archivos",
"DEPENDENCIES": "Dependencias",
"VALUES": "Valores",
Expand Down
6 changes: 6 additions & 0 deletions src/portal/src/images/artifact-label-safetensor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 5 additions & 31 deletions src/portal/src/images/artifact-label-transformer.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/portal/src/images/images/artifact-label-diffusers.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4bb64f1

Please sign in to comment.