-
Couldn't load subscription status.
- Fork 168
Allow code to be viewed without installing models in Samples #428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
532d0be
ffcbe5a
b143dd4
6c3c63c
e16e75a
6ae013a
2365167
824892e
ac72c76
57d1438
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -345,10 +345,12 @@ string GetValueOrNull(string? value, string ifNull) | |
| var realCachedModel = App.ModelCache.GetCachedModel(selectedModelDetails.Url); | ||
| if (realCachedModel == null) | ||
| { | ||
| return null; | ||
| cachedModel = new(selectedModelDetails.Id, "Need Download", selectedModelDetails.Url, selectedModelDetails.Size, selectedModelDetails.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can improve how this looks in the code - There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which of the following do you mean to change?
|
||
| } | ||
| else | ||
| { | ||
| cachedModel = new(selectedModelDetails.Id, realCachedModel.Path, realCachedModel.Details.Url, realCachedModel.ModelSize, selectedModelDetails.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); | ||
| } | ||
|
|
||
| cachedModel = new(selectedModelDetails.Id, realCachedModel.Path, realCachedModel.Details.Url, realCachedModel.ModelSize, selectedModelDetails.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); | ||
| } | ||
|
|
||
| var cachedSampleItem = App.FindSampleItemById(cachedModel.Id); | ||
|
|
@@ -374,10 +376,12 @@ string GetValueOrNull(string? value, string ifNull) | |
| var realCachedModel = App.ModelCache.GetCachedModel(selectedModelDetails2.Url); | ||
| if (realCachedModel == null) | ||
| { | ||
| return null; | ||
| cachedModel = new(selectedModelDetails2.Id, "Need Download", selectedModelDetails2.Url, selectedModelDetails2.Size, selectedModelDetails2.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); | ||
| } | ||
| else | ||
| { | ||
| cachedModel = new(selectedModelDetails2.Id, realCachedModel.Path, realCachedModel.Url, realCachedModel.ModelSize, selectedModelDetails2.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); | ||
| } | ||
|
|
||
| cachedModel = new(selectedModelDetails2.Id, realCachedModel.Path, realCachedModel.Url, realCachedModel.ModelSize, selectedModelDetails2.HardwareAccelerators.FirstOrDefault(), winMlSampleOptions); | ||
| } | ||
|
|
||
| var model2Type = sample.Model2Types.Any(cachedSampleItem.Contains) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.