Skip to content

Commit

Permalink
Merge pull request #68 from openvinotoolkit/rhecker/update-images
Browse files Browse the repository at this point in the history
Improve the model images really quickly a bit
  • Loading branch information
RHeckerIntel authored Dec 19, 2024
2 parents 75d6b09 + c955015 commit 1fbcfdf
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 1 deletion.
Binary file modified images/model_thumbnails/dolly.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/model_thumbnails/microsoft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/model_thumbnails/mistral.jpg
Binary file not shown.
Binary file added images/model_thumbnails/mistral.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/model_thumbnails/zephyr7b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lib/utils/get_public_thumbnail.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Image getThumbnail(String id) {
}

if (name.contains('mistral') || name.contains('mixstral')) {
return Image.asset('images/model_thumbnails/mistral.jpg');
return Image.asset('images/model_thumbnails/mistral.png');
}

if (name.contains('phi')) {
Expand Down
38 changes: 38 additions & 0 deletions test/utils/get_public_thumbnail_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright 2024 Intel Corporation.
// SPDX-License-Identifier: Apache-2.0

import 'package:fluent_ui/fluent_ui.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:inference/utils/get_public_thumbnail.dart';

void main() {

group('getThumbnail', () {

final testCases = [
["TinyLlama-1.1B-Chat-v1.0-fp16-ov", "images/model_thumbnails/llama.jpg"],
["Phi-3-mini-4k-instruct-fp16-ov", "images/model_thumbnails/microsoft.png"],
["mistral-7b-instruct-v0.1-int8-ov", "images/model_thumbnails/mistral.png"],
["RedPajama-INCITE-Chat-3B-v1-int8-ov", "images/model_thumbnails/redpajama.png"],
["codegen25-7b-multi-int4-ov", "images/model_thumbnails/codegen.png"],
["gpt-neox-20b-int8-ov", "images/model_thumbnails/eleuthera.jpg"],
["pythia-1.4b-int4-ov", "images/model_thumbnails/eleuthera.jpg"],
["starcoder2-15b-int8-ov", "images/model_thumbnails/starcoder2.png"],
["zephyr-7b-beta-int8-ov", "images/model_thumbnails/zephyr7b.png"],
["persimmon-8b-chat-int4-ov", "images/model_thumbnails/adeptai.png"],
["notus-7b-v1-fp16-ov", "images/model_thumbnails/notus.png"],
["dolly-v2-3b-int4-ov", "images/model_thumbnails/dolly.png"],
["unknown", "images/model_thumbnails/generic.jpg"],
["", "images/model_thumbnails/generic.jpg"],
];

for (final testCase in testCases) {
final input = testCase[0];
final expectedAsset = testCase[1];
test('test $input model', () {
final subject = getThumbnail(input).image as AssetImage;
expect(subject.assetName, expectedAsset);
});
}
});
}

0 comments on commit 1fbcfdf

Please sign in to comment.