|
|
@ -8,6 +8,7 @@ using System.Text.Json; |
|
|
|
using System.Text.Json.Serialization; |
|
|
|
using System.Text.Json.Serialization; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using System.Threading.Tasks; |
|
|
|
using Avalonia; |
|
|
|
using Avalonia; |
|
|
|
|
|
|
|
using Avalonia.Controls; |
|
|
|
using Avalonia.Controls.Notifications; |
|
|
|
using Avalonia.Controls.Notifications; |
|
|
|
using Avalonia.Data; |
|
|
|
using Avalonia.Data; |
|
|
|
using Avalonia.Input; |
|
|
|
using Avalonia.Input; |
|
|
@ -79,7 +80,10 @@ public partial class HuggingFacePageViewModel : TabViewModelBase |
|
|
|
.Group(i => i.ModelCategory) |
|
|
|
.Group(i => i.ModelCategory) |
|
|
|
.Transform( |
|
|
|
.Transform( |
|
|
|
g => |
|
|
|
g => |
|
|
|
new CategoryViewModel(g.Cache.Items) |
|
|
|
new CategoryViewModel( |
|
|
|
|
|
|
|
g.Cache.Items, |
|
|
|
|
|
|
|
Design.IsDesignMode ? string.Empty : settingsManager.ModelsDirectory |
|
|
|
|
|
|
|
) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Title = g.Key.GetDescription() ?? g.Key.ToString() |
|
|
|
Title = g.Key.GetDescription() ?? g.Key.ToString() |
|
|
|
} |
|
|
|
} |
|
|
@ -149,7 +153,7 @@ public partial class HuggingFacePageViewModel : TabViewModelBase |
|
|
|
var sharedFolderType = viewModel.Item.ModelCategory.ConvertTo<SharedFolderType>(); |
|
|
|
var sharedFolderType = viewModel.Item.ModelCategory.ConvertTo<SharedFolderType>(); |
|
|
|
var downloadPath = new FilePath( |
|
|
|
var downloadPath = new FilePath( |
|
|
|
Path.Combine( |
|
|
|
Path.Combine( |
|
|
|
settingsManager.ModelsDirectory, |
|
|
|
Design.IsDesignMode ? string.Empty : settingsManager.ModelsDirectory, |
|
|
|
sharedFolderType.ToString(), |
|
|
|
sharedFolderType.ToString(), |
|
|
|
viewModel.Item.Subfolder ?? string.Empty, |
|
|
|
viewModel.Item.Subfolder ?? string.Empty, |
|
|
|
file |
|
|
|
file |
|
|
|