Skip to content

Commit

Permalink
Update ImageInterpretationScreen.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
NSTiwari authored Jan 6, 2024
1 parent 5dac12e commit cba50e6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ fun ImageInterpretationScreen(
uiState: ImageInterpretationUiState = ImageInterpretationUiState.Loading,
onReasonClicked: (String, List<Uri>) -> Unit = { _, _ -> }
) {
val userQuestion = "Get the name of the medicine, its symptoms, primary diagnosis, usage, and dosage from the input image in the following format. \n" +
val textPrompt = "Get the name of the medicine, its symptoms, primary diagnosis, usage, and dosage from the input image in the following format. \n" +
"Example: ● Name\n" +
"● Symptoms: \n and so on." +
"Make sure to ask the person to visit the doctor if problem persists."
Expand Down Expand Up @@ -141,8 +141,8 @@ fun ImageInterpretationScreen(

Button(
onClick = {
if (userQuestion.isNotBlank()) {
onReasonClicked(userQuestion, imageUris.toList())
if (textPrompt.isNotBlank()) {
onReasonClicked(textPrompt, imageUris.toList())
}
},
modifier = Modifier
Expand Down

0 comments on commit cba50e6

Please sign in to comment.