教你用通义千问只要五步让千年的兵马俑跳上现代的科目三?

教你用五步让千年的兵马俑跳上现代的舞蹈科目三?

上面这个"科目三"的视频,只用了一张我上月去西安拍的兵马俑照片生成的。

使用通义千问,只要5步就能它舞动起来,跳上现在流行的"科目三"舞蹈。

全民舞王

第1步

打开通义千问App,我使用的是华为手机,苹果版的没试;

在对话框里打上"全民舞王",点发送。

第2步

点击"立即体验热舞"

第3步

选择"舞蹈模板"

第4步

上传全身照片

第5步

点击"立即生成"

告知生成预计时间,以及生成结果存放位置

过一段时间,就能到"创作记录"中去下载你的作品了。


通义千问是阿里的人工智能大模型,它除了这个照片变视频的技能,千义通问的编程能力也挺强的,比如我们随便来试一问:

问:你擅长编写java代码,请你根据我的需求编写规范且正确的java代码,我的需求是:写一个 web socket

答:在Java中,我们可以使用Spring框架的WebSocket支持来实现WebSocket服务端。以下是一个简单的WebSocket配置和处理类的示例:

// 首先,添加WebSocket依赖到你的pom.xml文件(如果你使用的是Maven)

<!-- Spring WebSocket -->

<dependency>

<groupId>org.springframework.boot</groupId>

<artifactId>spring-boot-starter-websocket</artifactId>

</dependency>

// 创建一个WebSocket的消息处理器

import org.springframework.web.socket.CloseStatus;

import org.springframework.web.socket.TextMessage;

import org.springframework.web.socket.WebSocketSession;

import org.springframework.web.socket.handler.TextWebSocketHandler;

public class MyWebSocketHandler extends TextWebSocketHandler {

@Override

public void handleTextMessage(WebSocketSession session, TextMessage message) throws Exception {

// 获取客户端发送的消息

String payload = message.getPayload();

System.out.println("Received message: " + payload);

// 向客户端发送消息

session.sendMessage(new TextMessage("Server received your message: " + payload));

}

@Override

public void afterConnectionEstablished(WebSocketSession session) throws Exception {

super.afterConnectionEstablished(session);

System.out.println("New WebSocket connection established");

}

@Override

public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {

session.close(CloseStatus.SERVER_ERROR);

System.out.println("WebSocket connection error: " + exception.getMessage());

}

@Override

public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {

super.afterConnectionClosed(session, status);

System.out.println("WebSocket connection closed with status code: " + status.getCode());

}

}

// 在Spring配置类中注册WebSocket Handler

import org.springframework.context.annotation.Configuration;

import org.springframework.web.socket.config.annotation.EnableWebSocket;

import org.springframework.web.socket.config.annotation.WebSocketConfigurer;

import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;

@Configuration

@EnableWebSocket

public class WebSocketConfig implements WebSocketConfigurer {

@Override

public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {

registry.addHandler(new MyWebSocketHandler(), "/myWebSocketEndpoint"); // 注册WebSocket处理程序并指定访问路径

}

}

以上代码创建了一个简单的WebSocket服务器,它监听"/myWebSocketEndpoint"路径上的连接,并且当接收到客户端消息时会将接收到的消息返回给客户端。

然后在前端(HTML/JavaScript)通过WebSocket API连接到这个WebSocket服务器:

var socket = new WebSocket('ws://localhost:8080/myWebSocketEndpoint');

socket.onopen = function(event) {

console.log("Connection open ...");

socket.send("Hello from client!");

};

socket.onmessage = function(event) {

console.log("Received message: " + event.data);

};

socket.onerror = function(error) {

console.error("WebSocket error observed:", error);

};

socket.onclose = function(event) {

console.log("Connection closed with code: " + event.code);

};


目录

全民舞王

第1步

第2步

第3步

第4步

第5步


End.

相关推荐
PPIO派欧云3 分钟前
PPIO 上线 DeepSeek-OCR-2 ,支持一键私有化部署
人工智能·ocr
tamide40096698914 分钟前
云南专业AIGEO搜索优化,解锁本地流量新密码
人工智能·aigc
2501_9476941817 分钟前
易直聘受邀出席重庆人才研究和人力资源服务协会会员代表大会,赋能企业促就业
大数据·人工智能
传说故事22 分钟前
【论文自动阅读】ActiveVLA: 将主动感知注入VLA模型以实现精准三维机器人操控
人工智能·深度学习·机器人·具身智能·vla
十六年开源服务商23 分钟前
AI客服系统WordPress集成指南
人工智能
小袁进化之路24 分钟前
黎跃春讲 AI 智能体运营工程师:从工程架构到可运营系统的完整实战详解
大数据·人工智能·架构
一只大侠的侠26 分钟前
DNN深度神经网络实战
人工智能·神经网络·dnn
博士僧小星29 分钟前
人工智能|大模型——应用——详解ClawdBot(Moltbot)
人工智能·大模型·agent·智能体·ai助理·clawdbot·moltbot
wechat_Neal32 分钟前
车企跨界机器人
人工智能·车载系统·机器人·汽车·人机交互
八边形战士Kimberlie38 分钟前
【教程+提示词】AI智能客服
人工智能·ai