删除 多余AI模型文件
This commit is contained in:
parent
5ff60df3d3
commit
b442e4f336
|
|
@ -0,0 +1,116 @@
|
||||||
|
{
|
||||||
|
"Env": [
|
||||||
|
{
|
||||||
|
"Name": "10楼刀片机",
|
||||||
|
"ServerList": [],
|
||||||
|
"LinuxServerList": [
|
||||||
|
{
|
||||||
|
"UserName": "hy",
|
||||||
|
"Pwd": "E9D1AC136FDD59740A9595ABD0EB953A",
|
||||||
|
"Host": "192.168.2.21:10107",
|
||||||
|
"NickName": "",
|
||||||
|
"IIsFireUrl": null,
|
||||||
|
"DockerFireUrl": "",
|
||||||
|
"WindowsServiceFireUrl": null,
|
||||||
|
"LinuxServiceFireUrl": null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"IgnoreList": [],
|
||||||
|
"WindowsBackUpIgnoreList": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"IIsConfig": {
|
||||||
|
"SdkType": null,
|
||||||
|
"WebSiteName": "",
|
||||||
|
"LastEnvName": null,
|
||||||
|
"EnvPairList": [
|
||||||
|
{
|
||||||
|
"EnvName": "10楼刀片机",
|
||||||
|
"ConfigName": "",
|
||||||
|
"LinuxEnvParam": null,
|
||||||
|
"DockerPort": null,
|
||||||
|
"DockerEnvName": null,
|
||||||
|
"DockerVolume": null,
|
||||||
|
"DockerOther": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"WindowsServiveConfig": {
|
||||||
|
"ServiceName": "",
|
||||||
|
"SdkType": null,
|
||||||
|
"LastEnvName": null,
|
||||||
|
"EnvPairList": [
|
||||||
|
{
|
||||||
|
"EnvName": "10楼刀片机",
|
||||||
|
"ConfigName": "",
|
||||||
|
"LinuxEnvParam": null,
|
||||||
|
"DockerPort": null,
|
||||||
|
"DockerEnvName": null,
|
||||||
|
"DockerVolume": null,
|
||||||
|
"DockerOther": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"LinuxServiveConfig": {
|
||||||
|
"ServiceName": "",
|
||||||
|
"EnvParam": "",
|
||||||
|
"LastEnvName": null,
|
||||||
|
"EnvPairList": [
|
||||||
|
{
|
||||||
|
"EnvName": "10楼刀片机",
|
||||||
|
"ConfigName": "",
|
||||||
|
"LinuxEnvParam": null,
|
||||||
|
"DockerPort": null,
|
||||||
|
"DockerEnvName": null,
|
||||||
|
"DockerVolume": null,
|
||||||
|
"DockerOther": null
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"DockerConfig": {
|
||||||
|
"Prot": "9040",
|
||||||
|
"AspNetCoreEnv": "",
|
||||||
|
"LastEnvName": "10楼刀片机",
|
||||||
|
"RemoveDaysFromPublished": "10",
|
||||||
|
"WorkDir": "",
|
||||||
|
"Volume": "/home/hy/VideoAnalysis/AICore:/app/AICore/_Static;/home/hy//VideoAnalysis/TaskCachedFile:/app/TaskCachedFile",
|
||||||
|
"Other": "",
|
||||||
|
"EnvPairList": [
|
||||||
|
{
|
||||||
|
"EnvName": "10楼刀片机",
|
||||||
|
"ConfigName": null,
|
||||||
|
"LinuxEnvParam": null,
|
||||||
|
"DockerPort": "9040",
|
||||||
|
"DockerEnvName": "",
|
||||||
|
"DockerVolume": "/home/hy/VideoAnalysis/AICore:/app/AICore/_Static;/home/hy//VideoAnalysis/TaskCachedFile:/app/TaskCachedFile",
|
||||||
|
"DockerOther": ""
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"DockerImageConfig": {
|
||||||
|
"BaseHttpProxy": "",
|
||||||
|
"BaseImage": "",
|
||||||
|
"BaseImageCredential": {
|
||||||
|
"UserName": "",
|
||||||
|
"Password": ""
|
||||||
|
},
|
||||||
|
"TargetImage": "",
|
||||||
|
"TargetHttpProxy": "",
|
||||||
|
"TargetTags": [
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"TargetImageCredential": {
|
||||||
|
"UserName": "",
|
||||||
|
"Password": ""
|
||||||
|
},
|
||||||
|
"ImageFormat": "Docker",
|
||||||
|
"Entrypoint": [
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"Cmd": [
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"IgnoreList": [],
|
||||||
|
"SkipExistingImages": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -89,19 +89,18 @@ namespace Learn.VideoAnalysis.Controllers
|
||||||
var mergedList = new List<TimeBase>();
|
var mergedList = new List<TimeBase>();
|
||||||
// 初始化合并段
|
// 初始化合并段
|
||||||
var current = timeBases.First();
|
var current = timeBases.First();
|
||||||
|
current.Content = string.Empty;
|
||||||
foreach (var next in timeBases)
|
foreach (var next in timeBases)
|
||||||
{
|
{
|
||||||
// 如果类型相同,则扩展时间段
|
// 如果类型相同,则扩展时间段
|
||||||
if (current.TimeBaseType == next.TimeBaseType)
|
if (current.TimeBaseType == next.TimeBaseType)
|
||||||
{
|
|
||||||
current.End = Math.Max(current.End, next.End);
|
current.End = Math.Max(current.End, next.End);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 类型不同,将当前时间段加入结果列表,并开始新时间段
|
// 类型不同,将当前时间段加入结果列表,并开始新时间段
|
||||||
current.Content = string.Empty;
|
|
||||||
mergedList.Add(current);
|
mergedList.Add(current);
|
||||||
current = next;
|
current = next;
|
||||||
|
current.Content = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 添加最后的时间段
|
// 添加最后的时间段
|
||||||
|
|
@ -114,10 +113,9 @@ namespace Learn.VideoAnalysis.Controllers
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="taskId"></param>
|
/// <param name="taskId"></param>
|
||||||
/// <param name="tagId">自定义id</param>
|
/// <param name="tagId">自定义id</param>
|
||||||
/// <param name="needSubtitle">是否附加字幕</param>
|
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet(Name = "TaskInfo")]
|
[HttpGet(Name = "TaskInfo")]
|
||||||
public async Task<IActionResult> TaskInfo(long taskId,string? tagId,bool needSubtitle=false)
|
public async Task<IActionResult> TaskInfo(long taskId,string? tagId)
|
||||||
{
|
{
|
||||||
var task = await videoTaskDB.AsQueryable()
|
var task = await videoTaskDB.AsQueryable()
|
||||||
.WhereIF(taskId!=0, s => s.Id == taskId)
|
.WhereIF(taskId!=0, s => s.Id == taskId)
|
||||||
|
|
@ -131,7 +129,7 @@ namespace Learn.VideoAnalysis.Controllers
|
||||||
taskData.Status = task.LastEnum;
|
taskData.Status = task.LastEnum;
|
||||||
if (task.LastEnum != RedisChannelEnum.EndTask)
|
if (task.LastEnum != RedisChannelEnum.EndTask)
|
||||||
return BadRequest(taskData);
|
return BadRequest(taskData);
|
||||||
if (!needSubtitle && taskData != null && taskData.TimeBase != null)
|
if (taskData != null && taskData.TimeBase != null)
|
||||||
taskData.TimeBase = MergeTimeBases(taskData.TimeBase);
|
taskData.TimeBase = MergeTimeBases(taskData.TimeBase);
|
||||||
return Ok(taskData);
|
return Ok(taskData);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||||
|
|
||||||
|
FROM dotnet/aspnet:8.0
|
||||||
|
WORKDIR /app
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
#设置时间为中国上海 环境为开发环境
|
||||||
|
ENV TZ=Asia/Shanghai
|
||||||
|
|
||||||
|
|
||||||
|
#RUN echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ sid main contrib non-free" > /etc/apt/sources.list
|
||||||
|
#RUN apt-get update && apt-get install -y apt-transport-https ca-certificates apt-utils libgdiplus libc6-dev && apt-get install -y libfreetype6 && apt-get install -y libfontconfig1 && apt-get install -y fontconfig
|
||||||
|
#
|
||||||
|
|
||||||
|
ENTRYPOINT ["dotnet", "Learn.VideoAnalysis.dll"]
|
||||||
|
|
@ -15,6 +15,16 @@
|
||||||
<None Remove="AICore\**" />
|
<None Remove="AICore\**" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<None Remove="Dockerfile" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Dockerfile">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</Content>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\VideoAnalysisCore\VideoAnalysisCore.csproj" />
|
<ProjectReference Include="..\VideoAnalysisCore\VideoAnalysisCore.csproj" />
|
||||||
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.2-pre01" />
|
<PackageReference Include="Mapster.DependencyInjection" Version="1.0.2-pre01" />
|
||||||
|
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"Default": "Information",
|
|
||||||
"Microsoft.AspNetCore": "Warning"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"Logging": {
|
||||||
|
"LogLevel": {
|
||||||
|
"Default": "Error",
|
||||||
|
"Microsoft.AspNetCore": "Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"AppConfig": {
|
||||||
|
"Redis": {
|
||||||
|
"ConnectionString": "10.255.255.3,password=qwe123!@#,defaultDatabase=10"
|
||||||
|
},
|
||||||
|
"FFmpeg": {
|
||||||
|
" TimeSlice": 600
|
||||||
|
},
|
||||||
|
"DB": {
|
||||||
|
"ConnectionString": "AllowLoadLocalInfile=true;Server=10.255.255.3;Port=3306;Database=learn.videoanalysis;User ID=marking;Password=qwe123!@#;CharSet=utf8mb4;pooling=true;SslMode=None",
|
||||||
|
"SqlType": "MySql",
|
||||||
|
"UpdateTable": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -63,8 +63,8 @@ namespace VideoAnalysisCore.AICore.ChatGPT.Dto
|
||||||
/// <para>满分100</para>
|
/// <para>满分100</para>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public float AssessmentScore =>
|
public float AssessmentScore =>
|
||||||
(float)(Assessment?.Bad?.Select(x => x.Score)
|
(float)Math.Round((Assessment?.Bad?.Select(x => x.Score)
|
||||||
.Concat(Assessment?.Merit?.Select(s => s.Score) ?? [])
|
.Concat(Assessment?.Merit?.Select(s => s.Score) ?? [])
|
||||||
.Average() ?? 0) * 100;
|
.Average() ?? 0) * 10,2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,6 @@
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Remove="AICore\_Static\ffmpeg.exe" />
|
<None Remove="AICore\_Static\ffmpeg.exe" />
|
||||||
<None Remove="AICore\_Static\ggml-base.bin" />
|
|
||||||
<None Remove="AICore\_Static\ggml-large-v3.bin" />
|
|
||||||
<None Remove="AICore\_Static\ggml-medium.bin" />
|
|
||||||
<None Remove="AICore\_Static\ggml-small.bin" />
|
|
||||||
<None Remove="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.int8.onnx" />
|
<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-pyannote-segmentation-3-0\model.onnx" />
|
||||||
<None Remove="AICore\_Static\wespeaker\wespeaker_zh_cnceleb_resnet34_LM.onnx" />
|
<None Remove="AICore\_Static\wespeaker\wespeaker_zh_cnceleb_resnet34_LM.onnx" />
|
||||||
|
|
@ -21,26 +17,14 @@
|
||||||
<Content Include="AICore\_Static\ffmpeg.exe">
|
<Content Include="AICore\_Static\ffmpeg.exe">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="AICore\_Static\ggml-base.bin">
|
<Content Include="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.int8.onnx">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\ggml-large-v3.bin">
|
|
||||||
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="AICore\_Static\ggml-medium.bin">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\ggml-small.bin">
|
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.int8.onnx">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</Content>
|
|
||||||
<Content Include="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.onnx">
|
<Content Include="AICore\_Static\sherpa-onnx-pyannote-segmentation-3-0\model.onnx">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
<Content Include="AICore\_Static\wespeaker\wespeaker_zh_cnceleb_resnet34_LM.onnx">
|
<Content Include="AICore\_Static\wespeaker\wespeaker_zh_cnceleb_resnet34_LM.onnx">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
|
||||||
</Content>
|
</Content>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue