Skip to content

Commit 6f9a1cc

Browse files
feat: Enhance banner rendering and updated README
1 parent 44f3725 commit 6f9a1cc

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ What works today:
1616
- Completeness scoring and validation of existing AIBOM files
1717
- Interactive or file based metadata enrichment
1818
- Data components with dataset fetchers and linking them in the AIBOM
19+
- Updated the UI to utilise Charm libraries
1920

2021
What is future work:
2122

22-
- Updating the UI to utilise Bubbletea library
2323
- Enhancing the resulting BOMs to include correct dependencies and BOMrefs
2424
- Improving the scanner beyond the current regex-based Hugging Face detection
2525
- Implementing the possibility to merge AIBOMs with existing sboms from a different source

cmd/root.go

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -120,22 +120,11 @@ func initConfig() {
120120
}
121121
}
122122

123-
// Simple ASCII banner shown at startup
124-
const bannerASCII = `
125-
/$$$$$$ /$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$
126-
/$$__ $$|_ $$_/| $$__ $$ | $$$ /$$$ /$$__ $$ | $$|__/
127-
| $$ \ $$ | $$ | $$ \ $$ /$$$$$$ | $$$$ /$$$$| $$ \__/ /$$$$$$ /$$$$$$$ /$$$$$$$| $$ /$$
128-
| $$$$$$$$ | $$ | $$$$$$$ /$$__ $$| $$ $$/$$ $$| $$ /$$$$ /$$__ $$| $$__ $$ /$$$$$$ /$$_____/| $$| $$
129-
| $$__ $$ | $$ | $$__ $$| $$ \ $$| $$ $$$| $$| $$|_ $$| $$$$$$$$| $$ \ $$|______/| $$ | $$| $$
130-
| $$ | $$ | $$ | $$ \ $$| $$ | $$| $$\ $ | $$| $$ \ $$| $$_____/| $$ | $$ | $$ | $$| $$
131-
| $$ | $$ /$$$$$$| $$$$$$$/| $$$$$$/| $$ \/ | $$| $$$$$$/| $$$$$$$| $$ | $$ | $$$$$$$| $$| $$
132-
|__/ |__/|______/|_______/ \______/ |__/ |__/ \______/ \_______/|__/ |__/ \_______/|__/|__/
133-
`
134123
const longDescription = "BOM Generator for Software Projects using AI. Helps PDE manufacturers create accurate Bills of Materials for their AI-based software projects."
135124

136125
func initUIAndBanner(cmd *cobra.Command) {
137126
if cmd == nil {
138127
return
139128
}
140-
cmd.Root().Long = ui.Primary.Render(bannerASCII) + "\n" + longDescription
129+
cmd.Root().Long = ui.RenderGradientBanner(ui.BannerASCII) + "\n" + longDescription
141130
}

config/enrichment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ BOM.metadata.component.modelCard.modelParameters.modelArchitecture: "bert-base"
2424

2525
BOM.metadata.component.modelCard.considerations.useCases: "Text generation, dialogue systems, creative writing"
2626
BOM.metadata.component.modelCard.considerations.technicalLimitations: "Limited context window of 512 tokens, may generate inconsistent or factually incorrect text"
27-
BOM.metadata.component.modelCard.considerations.ethicalConsiderations: "May generate biased or harmful content based on training data. Should not be used for sensitive applications without additional safeguards."
27+
BOM.metadata.component.modelCard.considerations.ethicalConsiderations: "May generate biased or harmful content based on training data. Should not be used for sensitive applications without additional safeguards."
28+
BOM.metadata.component.modelCard.considerations.environmentalConsiderations.properties: "Example:Training large language models can have a significant carbon footprint due to high computational requirements."

internal/ui/styles.go

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,21 @@ func FangColorScheme(c lipgloss.LightDarkFunc) fang.ColorScheme {
219219
ErrorDetails: ColorError,
220220
}
221221
}
222+
223+
// BannerASCII is the ASCII art banner for the application
224+
const BannerASCII = `
225+
/$$$$$$ /$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$
226+
/$$__ $$|_ $$_/| $$__ $$ | $$$ /$$$ /$$__ $$ | $$|__/
227+
| $$ \ $$ | $$ | $$ \ $$ /$$$$$$ | $$$$ /$$$$| $$ \__/ /$$$$$$ /$$$$$$$ /$$$$$$$| $$ /$$
228+
| $$$$$$$$ | $$ | $$$$$$$ /$$__ $$| $$ $$/$$ $$| $$ /$$$$ /$$__ $$| $$__ $$ /$$$$$$ /$$_____/| $$| $$
229+
| $$__ $$ | $$ | $$__ $$| $$ \ $$| $$ $$$| $$| $$|_ $$| $$$$$$$$| $$ \ $$|______/| $$ | $$| $$
230+
| $$ | $$ | $$ | $$ \ $$| $$ | $$| $$\ $ | $$| $$ \ $$| $$_____/| $$ | $$ | $$ | $$| $$
231+
| $$ | $$ /$$$$$$| $$$$$$$/| $$$$$$/| $$ \/ | $$| $$$$$$/| $$$$$$$| $$ | $$ | $$$$$$$| $$| $$
232+
|__/ |__/|______/|_______/ \______/ |__/ |__/ \______/ \_______/|__/ |__/ \_______/|__/|__/
233+
`
234+
235+
// RenderGradientBanner renders the banner with secondary color (cyan)
236+
func RenderGradientBanner(banner string) string {
237+
// did not find a good way to do gradient in lipgloss, so using secondary color for now
238+
return Secondary.Render(banner)
239+
}

0 commit comments

Comments
 (0)