删除 过时的打包配置AI模型
This commit is contained in:
parent
18e60d4a9b
commit
abca6480a1
|
|
@ -1,6 +1,8 @@
|
||||||
|
|
||||||
using Learn.VideoAnalysis.API.Expand;
|
using Learn.VideoAnalysis.API.Expand;
|
||||||
using Mapster;
|
using Mapster;
|
||||||
|
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||||
|
using Microsoft.AspNetCore.Hosting.Server;
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
|
@ -79,7 +81,19 @@ namespace Learn.VideoAnalysis.API
|
||||||
app.UseCorsExpand();
|
app.UseCorsExpand();
|
||||||
app.UseSqlSugarExpand();
|
app.UseSqlSugarExpand();
|
||||||
app.UseCoravelExpand();
|
app.UseCoravelExpand();
|
||||||
|
// 注册启动后的回调
|
||||||
|
app.Lifetime.ApplicationStarted.Register(() =>
|
||||||
|
{
|
||||||
|
var server = app.Services.GetRequiredService<IServer>();
|
||||||
|
var addressFeature = server.Features.Get<IServerAddressesFeature>();
|
||||||
|
Console.WriteLine("===========================================");
|
||||||
|
Console.WriteLine($"Kestrel 监听地址: ");
|
||||||
|
foreach (var address in addressFeature.Addresses)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{address}");
|
||||||
|
}
|
||||||
|
Console.WriteLine("===========================================");
|
||||||
|
});
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"version": 1,
|
||||||
|
"isRoot": true,
|
||||||
|
"tools": {
|
||||||
|
"dotnet-ef": {
|
||||||
|
"version": "10.0.3",
|
||||||
|
"commands": [
|
||||||
|
"dotnet-ef"
|
||||||
|
],
|
||||||
|
"rollForward": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -16,6 +16,8 @@ using VideoAnalysisCore.AICore.FFMPGE;
|
||||||
using System.Text.Encodings.Web;
|
using System.Text.Encodings.Web;
|
||||||
using System.Text.Unicode;
|
using System.Text.Unicode;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
|
using Microsoft.AspNetCore.Hosting.Server.Features;
|
||||||
|
using Microsoft.AspNetCore.Hosting.Server;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -28,7 +30,8 @@ namespace Learn.VideoAnalysis
|
||||||
|
|
||||||
var builder = WebApplication.CreateBuilder(args);
|
var builder = WebApplication.CreateBuilder(args);
|
||||||
//设置接口请求体最大100m
|
//设置接口请求体最大100m
|
||||||
builder.WebHost.ConfigureKestrel(serverOptions => {
|
builder.WebHost.ConfigureKestrel(serverOptions =>
|
||||||
|
{
|
||||||
serverOptions.Limits.MaxRequestBodySize = 100_000_000; // 100MB
|
serverOptions.Limits.MaxRequestBodySize = 100_000_000; // 100MB
|
||||||
});
|
});
|
||||||
builder.Services.AddLogging(loggingBuilder =>
|
builder.Services.AddLogging(loggingBuilder =>
|
||||||
|
|
@ -38,6 +41,7 @@ namespace Learn.VideoAnalysis
|
||||||
loggingBuilder.SetMinimumLevel(LogLevel.Warning); // 设置最小日志级别为 Warning
|
loggingBuilder.SetMinimumLevel(LogLevel.Warning); // 设置最小日志级别为 Warning
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//绑定 appsetting 配置
|
//绑定 appsetting 配置
|
||||||
builder.Configuration.AddAppConfig(args);
|
builder.Configuration.AddAppConfig(args);
|
||||||
//初始化 插件
|
//初始化 插件
|
||||||
|
|
@ -128,6 +132,21 @@ namespace Learn.VideoAnalysis
|
||||||
app.UseSqlSugarExpand();
|
app.UseSqlSugarExpand();
|
||||||
app.UseCoravelExpand();
|
app.UseCoravelExpand();
|
||||||
|
|
||||||
|
// 注册启动后的回调
|
||||||
|
app.Lifetime.ApplicationStarted.Register(() =>
|
||||||
|
{
|
||||||
|
var server = app.Services.GetRequiredService<IServer>();
|
||||||
|
var addressFeature = server.Features.Get<IServerAddressesFeature>();
|
||||||
|
Console.WriteLine("===========================================");
|
||||||
|
Console.WriteLine($"Kestrel 监听地址: ");
|
||||||
|
foreach (var address in addressFeature.Addresses)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"{address}");
|
||||||
|
}
|
||||||
|
Console.WriteLine("===========================================");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
app.Run();
|
app.Run();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,53 +9,8 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="AICore\_Static\ffmpeg.exe" />
|
<None Remove="AICore\_Static\ffmpeg.exe" />
|
||||||
<None Remove="AICore\_Static\Hotwords.json" />
|
|
||||||
<None Remove="AICore\_Static\itn_subject_sx.fst" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-fst.py" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.int8.onnx" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.onnx" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\bpe.model" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\decoder-epoch-99-avg-1.onnx" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\encoder-epoch-99-avg-1.onnx" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\joiner-epoch-99-avg-1.onnx" />
|
|
||||||
<None Remove="AICore\_Static\wespeaker\wespeaker_zh_cnceleb_resnet34_LM.onnx" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="AICore\_Static\ffmpeg.exe">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\Hotwords.json">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\itn_subject_sx.fst">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-fst.py">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.int8.onnx">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.onnx">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\bpe.model">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\decoder-epoch-99-avg-1.onnx">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\encoder-epoch-99-avg-1.onnx">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-streaming-zipformer-bilingual-zh-en-2023-02-20\joiner-epoch-99-avg-1.onnx">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\wespeaker\wespeaker_zh_cnceleb_resnet34_LM.onnx">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="AlibabaCloud.SDK.Vod20170321" Version="3.6.1" />
|
<PackageReference Include="AlibabaCloud.SDK.Vod20170321" Version="3.6.1" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue