add kotlin coroutines dependency

This commit is contained in:
Denis-Cosmin Nutiu 2024-03-22 22:28:43 +02:00
parent 8e311a5865
commit 9831b7acb7
3 changed files with 3 additions and 3 deletions

View file

@ -46,6 +46,7 @@ dependencies {
}
implementation('org.kordamp.ikonli:ikonli-javafx:12.3.1')
implementation('com.microsoft.onnxruntime:onnxruntime:1.17.1')
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1-Beta")
testImplementation("org.junit.jupiter:junit-jupiter-api:${junitVersion}")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:${junitVersion}")
}

View file

@ -11,6 +11,7 @@ module com.nuculabs.dev.imagetagger.ui {
requires com.microsoft.onnxruntime;
requires java.logging;
requires java.desktop;
requires kotlinx.coroutines.core;
opens com.nuculabs.dev.imagetagger.ui to javafx.fxml, javafx.graphics;
opens com.nuculabs.dev.imagetagger.ui.controls to javafx.fxml, javafx.graphics;

View file

@ -4,7 +4,6 @@ import com.nuculabs.dev.imagetagger.tag_prediction.ImageTagsPrediction
import com.nuculabs.dev.imagetagger.ui.controls.ImageTagsEntryControl
import javafx.application.Platform
import javafx.fxml.FXML
import javafx.scene.control.Label
import javafx.scene.control.ProgressBar
import javafx.scene.control.Separator
import javafx.scene.layout.VBox
@ -12,7 +11,6 @@ import javafx.stage.FileChooser
import java.io.File
import java.util.logging.Logger
import javax.imageio.ImageIO
import kotlin.math.log
class MainPageController {
@ -38,7 +36,7 @@ class MainPageController {
progressBar.isVisible = true
progressBar.progress = 0.0;
progressBar.progress = 0.0
// Create a new thread to predict the images.
val thread = Thread {
val filePathsTotal = filePaths.count()