前端静态资源导入

main
cxy 2 months ago
parent e7fb395e66
commit 9416a310d0

@ -0,0 +1,153 @@
body{
margin: 0;
background: #333;
}
#title{
position: absolute;
width: 40%;
height: 10%;
top: 0;
left: 30%;
color: white;
font-size: 35px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
#tim{
position: absolute;
height: 5%;
top: 5%;
right: 2%;
background: transparent;
font-size: 20px;
}
#c1{
position: absolute;
width: 40%;
height: 30%;
top: 10%;
left: 30%;
color: white;
}
.num{
width: 25%;
float: left;
display: flex;
align-items: center;
justify-content: center;
color: gold;
font-size: 20px;
}
.txt{
width: 25%;
float: left;
font-family: "幼圆";
display: flex;
align-items: center;
justify-content: center;
}
.txt h2{
margin: 0;
}
#c2{
position: absolute;
width: 40%;
height: 60%;
top: 40%;
left: 30%;
/*background: #888888;*/
}
#l1{
position: absolute;
width: 30%;
height: 45%;
top: 10%;
left: 0;
/*background: #999999;*/
}
#container{
position: absolute;
padding-top: 15px;
width: 30%;
height: 45%;
top: 55%;
left: 0;
/*background: #353;*/
overflow: hidden;
}
#l2{
/*position: absolute;*/
text-align: center;
display: flex;
width: 100%;
height: 20%;
/*top: 0;*/
/*left: 0;*/
/*background: #777;*/
overflow: hidden;
mask-image: linear-gradient(
90deg, transparent, #fff 20%, #fff 80%, transparent
);
}
#l2 div{
white-space: nowrap;
animation: animate var(--t) linear infinite;
}
#l2 div:nth-child(2){
animation: animate2 var(--t) linear infinite;
animation-delay: calc(var(--t)/ -2);
}
@keyframes animate {
from{
transform: translate(100%);
}
to{
transform: translate(-100%);
}
}
@keyframes animate2 {
from{
transform: translate(0);
}
to{
transform: translate(-200%);
}
}
#l2 div span{
display: inline-flex;
margin: 10px;
letter-spacing: .2em;
background-color: #504d4d;
color: #fff;
padding: 5px 10px;
border-radius: 5px;
}
#r1{
position: absolute;
/*padding-bottom: 10px;*/
width: 30%;
/*height: 45%;*/
height: 371px;
top: 10%;
left: 70%;
/*background: #8888;*/
}
#r2{
position: absolute;
width: 30%;
height: 45%;
top: 55%;
left: 70%;
/*background: #444;*/
}
#wordCloudImage{
width: 100%;
height: auto;
max-width: 100%;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,31 @@
url,content,tag
https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/,A whole biomechanical analysis,strong
https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/,Safer diving,strong
https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/,The ultimate (for now) photo finish,strong
https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/,Smart bibs,strong
https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/,"Running on the beach, quick moves on the tennis court",strong
https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/,"AI comes to the Olympics: In Paris, new tech will change your view of the Games",h1
https://www.news.ufl.edu/2024/07/ai-olympics/,How AI will transform the Olympics,h1
https://www.news.ufl.edu/2024/07/ai-olympics/,Perfecting talent,h2
https://www.news.ufl.edu/2024/07/ai-olympics/,Judging upgrades,h2
https://www.news.ufl.edu/2024/07/ai-olympics/,Streamlining for host cities,h2
https://www.thepaper.cn/newsDetail_forward_28287864,技术一AI技术成就8K超高清直播,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术二AI自动生成定制化精彩集锦,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术三3D全息视频技术让观众身临其境,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术四通过AI平台全方位分析运动数据,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术五用AI为视障人士搭建无障碍设施,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术六AI技术辅助现场管理,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术七用AI打造专属于运动员的GPT,p
https://www.thepaper.cn/newsDetail_forward_28287864,技术八:神经对象克隆技术助力数字收藏,p
https://www.wicongress.org.cn/2024/zh/article/6268,运动员的“贴身顾问”,strong
https://www.wicongress.org.cn/2024/zh/article/6268,成绩提升的“好帮手”,strong
https://www.wicongress.org.cn/2024/zh/article/6268,开辟观赛的“新视野”,strong
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,人工智能介入到观众的数字观赛体验,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,AI帮助实现巴黎奥运会的交通能耗数字管理,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,全新数字技术可以实时追踪运动员赛场表现,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,可持续性和环境影响通过AI加以优化,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,AI驱动阿里巴巴云服务提升转播体验,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,英特尔配合AI PC带来革命性的 8K 直播,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,丰田和合作伙伴GCK为 2024 年奥运会提供氢燃料客车,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,中国九号公司助力Tier-Dott为巴黎提供电动自行车,h2
https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/,总结:,h2
1 url content tag
2 https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/ ‘A whole biomechanical analysis’ strong
3 https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/ Safer diving strong
4 https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/ The ultimate (for now) photo finish strong
5 https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/ Smart bibs strong
6 https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/ Running on the beach, quick moves on the tennis court strong
7 https://www.nytimes.com/athletic/5646415/2024/07/25/2024-paris-olympics-ai-omega/ AI comes to the Olympics: In Paris, new tech will change your view of the Games h1
8 https://www.news.ufl.edu/2024/07/ai-olympics/ How AI will transform the Olympics h1
9 https://www.news.ufl.edu/2024/07/ai-olympics/ Perfecting talent h2
10 https://www.news.ufl.edu/2024/07/ai-olympics/ Judging upgrades h2
11 https://www.news.ufl.edu/2024/07/ai-olympics/ Streamlining for host cities h2
12 https://www.thepaper.cn/newsDetail_forward_28287864 技术一:AI技术成就8K超高清直播 p
13 https://www.thepaper.cn/newsDetail_forward_28287864 技术二:AI自动生成定制化精彩集锦 p
14 https://www.thepaper.cn/newsDetail_forward_28287864 技术三:3D全息视频技术让观众身临其境 p
15 https://www.thepaper.cn/newsDetail_forward_28287864 技术四:通过AI平台全方位分析运动数据 p
16 https://www.thepaper.cn/newsDetail_forward_28287864 技术五:用AI为视障人士搭建无障碍设施 p
17 https://www.thepaper.cn/newsDetail_forward_28287864 技术六:AI技术辅助现场管理 p
18 https://www.thepaper.cn/newsDetail_forward_28287864 技术七:用AI打造专属于运动员的GPT p
19 https://www.thepaper.cn/newsDetail_forward_28287864 技术八:神经对象克隆技术助力数字收藏 p
20 https://www.wicongress.org.cn/2024/zh/article/6268 运动员的“贴身顾问” strong
21 https://www.wicongress.org.cn/2024/zh/article/6268 成绩提升的“好帮手” strong
22 https://www.wicongress.org.cn/2024/zh/article/6268 开辟观赛的“新视野” strong
23 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 人工智能介入到观众的数字观赛体验 h2
24 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ AI帮助实现巴黎奥运会的交通能耗数字管理 h2
25 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 全新数字技术可以实时追踪运动员赛场表现 h2
26 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 可持续性和环境影响通过AI加以优化 h2
27 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ AI驱动阿里巴巴云服务提升转播体验 h2
28 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 英特尔配合AI PC带来革命性的 8K 直播 h2
29 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 丰田和合作伙伴GCK为 2024 年奥运会提供氢燃料客车 h2
30 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 中国九号公司助力Tier-Dott为巴黎提供电动自行车 h2
31 https://cn.technode.com/post/2024-08-06/paris-2024-esg-ai-digital-new-tech/ 总结: h2

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

@ -0,0 +1,8 @@
// 发送请求到后端获取平均情感得分
fetch('/average_sentiment')
.then(response => response.json())
.then(data => {
// 获取平均情感得分并更新到前端
document.querySelector('#average_sentiment h1').textContent = data.average_sentiment.toFixed(2);
})
.catch(error => console.error('Error:', error));

@ -0,0 +1,8 @@
// 发送请求到后端获取弹幕总数
fetch('/barrage_count')
.then(response => response.json())
.then(data => {
// 获取行数并更新到前端
document.querySelector('#barrage_count h1').textContent = data.row_count;
})
.catch(error => console.error('Error:', error));

@ -0,0 +1,45 @@
document.addEventListener('DOMContentLoaded', function() {
var chartDom = document.getElementById('r1');
var myChart = echarts.init(chartDom);
var option;
fetch('/barrage_sentiment')
.then(response => response.json())
.then(data => {
// 只加载前100条数据
data = data.slice(0, 250);
var scatterData = data.map((item, index) => [index, item.sentiment]);
option = {
title: {
text: '弹幕情感分析',
left: 'center',
top: 'bottom',
textStyle: {
color: '#FFFFFF',
}
},
tooltip: {},
xAxis: {
type: 'category',
data: data.map((item, index) => index),
axisLabel: {
show:false
}
},
yAxis: {
type: 'value'
},
series: [{
data: scatterData,
type: 'scatter',
itemStyle: {
color: 'rgba(255, 0, 0, 0.8)'
}
}]
};
myChart.setOption(option);
});
});

@ -0,0 +1,47 @@
fetch('/data')
.then(response => response.json())
.then(data => {
let clusterData = {};
data.forEach(item => {
if (!clusterData[item.cluster]) {
clusterData[item.cluster] = [];
}
clusterData[item.cluster].push(item.barrage);
});
let seriesData = [];
for (let cluster in clusterData) {
seriesData.push({
name: `Cluster ${cluster}`,
type: 'bar',
data: clusterData[cluster].map((item, index) => ({ value: item.length, name: `弹幕 ${index + 1}` }))
});
}
let chart = echarts.init(document.getElementById('l1'));
let option = {
title: {
text: '弹幕聚类分析',
left:'center',
top: 'bottom',
textStyle: {
color: '#ffffff'
}
},
tooltip: {},
legend: {
data: seriesData.map(item => item.name),
textStyle: {
color: '#ffffff'
}
},
xAxis: {
data: seriesData[0].data.map(item => item.name),
axisLabel: {
show: false,
}
},
yAxis: {},
series: seriesData
};
chart.setOption(option);
});

@ -0,0 +1,8 @@
// 发送请求到后端获取关键字数量
fetch('/count_keywords')
.then(response => response.json())
.then(data => {
// 获取关键字数量并更新到前端
document.querySelector('#keyword_count h1').textContent = data.keyword_count;
})
.catch(error => console.error('Error:', error));

File diff suppressed because one or more lines are too long

@ -0,0 +1,121 @@
document.addEventListener('DOMContentLoaded', function () {
var myChart = echarts.init(document.getElementById('c2'));
myChart.showLoading();
$.when(
$.get('https://fastly.jsdelivr.net/npm/echarts/map/json/china.json'),
$.getScript('https://fastly.jsdelivr.net/npm/d3-array'),
$.getScript('https://fastly.jsdelivr.net/npm/d3-geo')
).done(function (res) {
const chinaJson = res[0];
const projection = d3.geoMercator();
myChart.hideLoading();
echarts.registerMap('China', chinaJson);
option = {
color: 'white',
title: {
text: '中国各省得奖情况',
sublink: 'http://www.census.gov/popest/data/datasets.html',
left: 'center',
top:'top',
textStyle:{
color:'#FFFFFF',
}
},
tooltip: {
trigger: 'item',
showDelay: 0,
transitionDuration: 0.2
},
visualMap: {
left: 'right',
min: 0,
max: 18,
inRange: {
color: [
'#313695',
'#4575b4',
'#74add1',
'#abd9e9',
'#e0f3f8',
'#ffffbf',
'#fee090',
'#fdae61',
'#f46d43',
'#d73027',
'#a50026'
]
},
text: ['高', '低'],
calculable: true,
show:false,
},
toolbox: {
show: false,
left: 'left',
top: 'top',
feature: {
dataView: {readOnly: false},
restore: {},
saveAsImage: {}
}
},
series: [
{
name: '奖牌数',
type: 'map',
map: 'China',
projection: {
project: function (point) {
return projection(point);
},
unproject: function (point) {
return projection.invert(point);
}
},
emphasis: {
label: {
show: true
}
},
data: [
{ name: '北京', value: 5 },
{ name: '天津', value: 3 },
{ name: '上海', value: 9 },
{ name: '重庆', value: 2 },
{ name: '河北', value: 5 },
{ name: '河南', value: 3 },
{ name: '云南', value: 2 },
{ name: '辽宁', value: 7 },
{ name: '黑龙江', value: 1 },
{ name: '湖南', value: 15 },
{ name: '安徽', value: 1 },
{ name: '山东', value: 16 },
{ name: '新疆', value: 1 },
{ name: '江苏', value: 17 },
{ name: '浙江', value: 18 },
{ name: '江西', value: 3 },
{ name: '湖北', value: 6 },
{ name: '广西', value: 2 },
{ name: '甘肃', value: 0 },
{ name: '山西', value: 0 },
{ name: '内蒙古', value: 2 },
{ name: '陕西', value: 0 },
{ name: '吉林', value: 4 },
{ name: '福建', value: 4 },
{ name: '贵州', value: 3 },
{ name: '广东', value: 16 },
{ name: '青海', value: 0 },
{ name: '西藏', value: 0 },
{ name: '四川', value: 18 },
{ name: '宁夏', value: 0 },
{ name: '海南', value: 2 },
{ name: '台湾', value: 7 },
{ name: '香港', value: 4 },
{ name: '澳门', value: 0 },
]
}
]
};
myChart.setOption(option);
});
});

@ -0,0 +1,13 @@
function getTime() {
$.ajax({
url: "/time",
timeout: 10000,
success: function (data) {
$("#tim").html(data);
},
error: function (xhr, type, errorThrown) {
console.error("Error occurred: ", type, errorThrown);
}
});
}
setInterval(getTime,100)

@ -0,0 +1,23 @@
fetch('/world_comment')
.then(response => response.json())
.then(data => {
const container = document.getElementById('container');
data.forEach(entry => {
const div = document.createElement('div');
div.id = 'l2';
div.style.setProperty('--t', entry.time);
const innerDiv = document.createElement('div');
entry.items.forEach(item => {
const span = document.createElement('span');
span.textContent = item;
innerDiv.appendChild(span);
});
div.appendChild(innerDiv.cloneNode(true)); // 克隆一份 innerDiv
div.appendChild(innerDiv); // 添加原始 innerDiv
container.appendChild(div);
});
})
.catch(error => console.error('Error fetching data:', error));

@ -0,0 +1,57 @@
fetch('/wordcloud')
.then(response => response.json())
.then(data => {
// let wordCloudData = [];
// for (let word in data) {
// wordCloudData.push({ name: word, value: data[word] });
// }
let chart = echarts.init(document.getElementById('r2'));
let option = {
tooltip: {
show: true
},
series: [{
type: 'wordCloud',
shape: 'circle',
maskImage: new Image(),
left: 'center',
top: 'center',
width: '100%',
height: '100%',
right: null,
bottom: null,
sizeRange: [12, 50],
rotationRange: [-90, 90],
rotationStep: 45,
gridSize: 8,
drawOutOfBound: false,
textStyle: {
normal: {
fontFamily: 'sans-serif',
fontWeight: 'bold',
color: function () {
return 'rgb(' + [
Math.round(Math.random() * 200) + 50,
Math.round(Math.random() * 50),
Math.round(Math.random() * 50) + 50
].join(',') + ')';
}
},
emphasis: {
shadowBlur: 10,
shadowColor: '#333'
}
},
data: data
}]
};
// 加载遮罩图像
let maskImage = new Image();
maskImage.src = 'static/img/log.png';
maskImage.onload = function() {
option.series[0].maskImage = maskImage;
chart.setOption(option);
};
});
Loading…
Cancel
Save