From 001f19f55955da96e4514341a9e7a23006842d2e Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 20 Jul 2024 20:22:57 +0200 Subject: [PATCH] fix error and get image from gallery --- covas_mobile/lib/pages/DisplayPictureScreen.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/covas_mobile/lib/pages/DisplayPictureScreen.dart b/covas_mobile/lib/pages/DisplayPictureScreen.dart index f98c71b..e9f9d5b 100644 --- a/covas_mobile/lib/pages/DisplayPictureScreen.dart +++ b/covas_mobile/lib/pages/DisplayPictureScreen.dart @@ -64,7 +64,9 @@ class DisplayPictureScreenState extends State gemini .textAndImage( - text: "What is this picture ?", images: [file.readAsBytesSync()]) + text: "What is this picture ?", + images: [file.readAsBytesSync()], + modelName: "models/gemini-1.5-flash-latest") .then((value) => showDescImageAddDialog( context, value?.content?.parts?.last.text ?? '')) .catchError((e) => print("problem gemini : ${e}"));