diff --git a/docs/image-analysis.png b/docs/image-analysis.png new file mode 100644 index 0000000..6a56b4d Binary files /dev/null and b/docs/image-analysis.png differ diff --git a/readme.md b/readme.md index 74f34a4..035a9d2 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -Image Tagger +# ![](./docs/image-analysis.png) Image Tagger Image Tagger is a simple software application for predicting an image's keywords using a deep learning model based on resnet. @@ -46,3 +46,7 @@ gradle run # Blog You can visit my tech blog at [https://blog.nuculabs.dev](https://blog.nuculabs.dev). + +# Credits + +- Icons: Image analysis icons created by Dewi Sari - Flaticon \ No newline at end of file diff --git a/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt b/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt index 25f1e1a..4e8d1e9 100644 --- a/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt +++ b/src/main/kotlin/dev/nuculabs/imagetagger/ui/MainPage.kt @@ -4,6 +4,7 @@ import dev.nuculabs.imagetagger.ai.ImageTagsPrediction import javafx.application.Application import javafx.fxml.FXMLLoader import javafx.scene.Scene +import javafx.scene.image.Image import javafx.stage.Stage import java.util.logging.Logger @@ -14,14 +15,21 @@ class MainPage : Application() { override fun start(stage: Stage) { ImageTagsPrediction.getInstance() - fxmlLoader = FXMLLoader(MainPage::class.java.getResource("main-window-view.fxml")) + // Load the FXML. val scene = Scene(fxmlLoader.load(), 640.0, 760.0) + + // Initialize the controller. fxmlLoader.getController().initialize() + + // Set up the stage. stage.title = "Image Tagger" stage.scene = scene stage.minWidth = 640.0 stage.minHeight = 760.0 + + // Add main icon + stage.icons.add(Image(MainPage::class.java.getResourceAsStream("image-analysis.png"))); stage.show() } diff --git a/src/main/resources/dev/nuculabs/imagetagger/ui/image-analysis.png b/src/main/resources/dev/nuculabs/imagetagger/ui/image-analysis.png new file mode 100644 index 0000000..6a56b4d Binary files /dev/null and b/src/main/resources/dev/nuculabs/imagetagger/ui/image-analysis.png differ