chatGPT basic necessities of life 10 scenarios series tutorial (01) Use chatGPT to design hairstyles and make P pictures beautiful~ so handsome hahaha~

guide

After more than 5 months, chatGPT can be said to be making rapid progress, becoming more and more popular, and taking the AIGC industry to fly together. So in just 5 months, are there any events worthy of our attention? Are there those funny scenes? And are there any useful tools for chatGPT? This article will tell you all about it. At the same time, how did chatGPT Yongge make a profit? What is the chatGPT product landing pit avoidance guide? Will chatGPT really replace the program? Where are the profit means and future development opportunities of chatGPT? Please read below.

Brother Yong will bring you the second chatGPT special live broadcast. I hope you will support us with one click and three consecutive sessions:

01-Introduction to live content

content outline

Brother Yong will start with a simple but not simple introduction of chatGPT, take everyone to review the hotspots of events in the past 5 months, and share a development tool. Then I started to treat everyone to play 10 scenes. Finally, what are the products of Brother Yong? How to realize it? Having already discussed the ecological development and development opportunities of chatGPT, let’s finally talk about whether chatGPT will replace programmers?
insert image description here

How to use chatGPT for hair styling?

As the saying goes, there is no youth without a hairstyle. A good-looking head is the main sign of youth, but do you have a hairstyle that suits you? Next, Brother Yong will use chatGPT to take you to design a hairstyle for yourself to show your youth.

insert image description here

Let’s look at a case first: How should I design a good-looking hairstyle for Brother Yong?

PS: Brother Yong showed up in real life, and he spent a lot of money.

Implementation steps:

  • The first step is to delete the avatar of the person in the source image
  • The second step calls the chatGPT API to generate hairstyles
  • The third step is to choose the hairstyle you like and go to the barber shop

insert image description here

The first step is to delete the avatars of the characters in the source image, paying special attention to the processed images:

  • Must be square, that is, the length and width of the picture must be equal
  • The format of the image file must be PNG

insert image description here

The second step calls the chatGPT API to generate hairstyles

// 从环境变量中获取openai-key
String key = System.getenv("API-KEY");

OpenAiClient client = OpenAiClientFactory.createClient(key);
// 发起生成头像的请求
RequestBody request = ImageEditRequest.builder()
    .image(new File("E:\\教学资料\\直播课\\第六场\\01-发型设计\\1.png"))//原图
    .mask(new File("E:\\教学资料\\直播课\\第六场\\01-发型设计\\a.png"))// 有空白的图
    .n(2)// 生成的头型照片张数
    .size("512x512")
    .prompt("设计一个好看的头型,要个性时尚")
    .build().toRequestBody();
Call<ImageResult> imageResultCall = client.callImageEdit(request);
// 解析结果
Response<ImageResult> execute = imageResultCall.execute();
if(execute.isSuccessful()) {
    
    
    List<Base64Image> list = execute.body().getData();
    for (Base64Image base64Image : list) {
    
    
        // 生成的头型地址
        System.out.println(base64Image.getUrl());
    }
}else{
    
    
    System.out.println("请求失败~");
}

Check the effect: It's so handsome, hahaha... Follow Brother Yong and support the following~~

insert image description here

How to use chatGPT to retouch pictures to beautify?

P-picture is everyone's dream. After having chatGPT, this dream is actually close to everyone. Next, we will use chatGPT to edit the picture and make our photos handsome~

insert image description here

Look at this case first, let chatGPT give us P to lose his beard

The steps to achieve are:

  • The first step is to blank the beard area in the photo
  • The second step is to call the code of chatGPT to modify the picture
  • The third step preview effect

insert image description here

The first step is to blank the beard area in the photo, erase the upper and lower beards, and note that I also removed the hair.

insert image description here

The second step is to call the code of chatGPT to modify the picture

// 从环境变量中获取openai-key
String key = System.getenv("API-KEY");

OpenAiClient client = OpenAiClientFactory.createClient(key);
// 发起生成头像的请求
RequestBody request = ImageEditRequest.builder()
    .image(new File("E:\\教学资料\\直播课\\第六场\\02-P图\\1.png"))//原图
    .mask(new File("E:\\教学资料\\直播课\\第六场\\02-P图\\a.png"))// 有空白的图
    .n(2)// 生成的头型照片张数
    .size("512x512")
    .prompt("皮肤美白一些、单眼皮、头型正式一些、上下胡子都不要,要去干净")
    .build().toRequestBody();
Call<ImageResult> imageResultCall = client.callImageEdit(request);
// 解析结果
Response<ImageResult> execute = imageResultCall.execute();
if(execute.isSuccessful()) {
    
    
    List<Base64Image> list = execute.body().getData();
    for (Base64Image base64Image : list) {
    
    
        // 生成的头型地址
        System.out.println(base64Image.getUrl());
    }
}else{
    
    
    System.out.println("请求失败~");
}

The third step preview effect

Through the effect, I found that chatGPT can't remove the beard, more and more, I am speechless

insert image description here

For this reason, I changed to let chatGPT give me P single eyelids, the effect is not bad, it is the head shape hahaha

insert image description here

The next article will share how to match clothes, jewelry, and if you shop accurately, follow me and don't miss it. Have fun. Thanks for the support!

Guess you like

Origin blog.csdn.net/luoxueyong/article/details/130284060