** Abstract: ** raise a glass to invite the moon, with technology to arty.

The Mid-Autumn Festival is approaching, do you start to miss friends and relatives far away, want to send blessings to them? Or with family reunion to appreciate the moon, hope to borrow a paragraph of elegant poetry lyrical expression?

Huawei cloud developers teach you a move, to a technical wind AI poetry!

Yue Fu poetry, AI li Bai

Huawei EI experience space small program before the launch of a new function – ** yuefu poetry. ** can not only write poems and lyrics, but also Tibetan poems.

As long as the theme is given, the five-word poem or seven-word quatrains can be made instantly according to the number of words and genre requirements.

For example, to a “Mid-Autumn Festival” seven words quatrains:

Wuyan Rhymes:

Let’s do another song “Appreciating the Moon.”

This choice of words and sentences, Li Bai came to applaud, cao Zhi seven steps into a poem was put to shame.

You can also enter “Huawei Cloud community” to try, we ask AI to send you sincere Mid-Autumn festival wishes!

But while AI poetry seems simple, the technology behind it is more remarkable.

As we all know, Chinese classical poetry usually has to meet certain requirements in terms of form and content, such as word count, rhyme, level and tone, and antithesis, etc. Moreover, poetry has many forms, such as five-word jue, seven-word jue, and poem, as well as word tags such as River Red, Water Tune song tou, and couplets. Therefore, it is quite complicated to use AI methods to produce Chinese classical poetry.

The key technology behind the poetry generation model lies in the powerful GPT model.

Huawei team first used large-scale Chinese news corpus to train the Chinese GPT model. Then using Chinese classical poetry as a corpus, fine-tuning it, we get the poetry generation system — Yuefu AI.

In order for the AI to learn to write poems on its own, the GPT model does not have any Settings, such as the number of words, rhythm, level and tone, and the knowledge of antithesis needed to compose poems. The model is self-taught.

In addition, Yuefu AI not only learned to compose poems, but also mastered a new skill — Tibetan poem.

For the antecedents, they used the same method. But when they trained the model of an alliterative poem, they replaced a theme from the previous training session (” Thoughts of the Still Night “) with the first character of each line of that poem (” Bed Of Doubt Raised Low “).

The results generated by this method surprised the team, who found that the model had learned the complex pairing rules of a poem. This rule is difficult to master, even for native Chinese speakers with normal education.

So, quickly open the small program to make a poem with yuefu, circle of friends low-key poem appreciation of the moon

If there is AI, I want to do “Li Bai”, five minutes to develop poetry robot

If AI poetry is already very impressive, here is a guide to directly create “Li Bai” — the development of intelligent poetry robot.

The process is very simple, supported by professional platform tools, and the specific operation is divided into four steps as follows:

1. Try the question-answering robot

First of all, create a trial version of professional q&A robot in Huawei Cloud for free.

Console.huaweicloud.com/cbs/?region…

2. Create a dictionary

Add poetry type dictionary (five-word quatrains, seven-word quatrains, etc.)

3. Skill configuration

This section will add corpus, mark and configure the skills of poetic robot.

After the corpus is added, the following results can be obtained:

Add user query template and robot reply management

4. Post and experience poetry writing skills

After the model is released, you can experience the poem writing robot by clicking the “Dialogue Experience” button in the upper right corner of the robot management page. Poetry type slot has been configured to enable candidates, so users can automatically reply by clicking on response type. Here is a sample set of conversations:

Congratulations, you have used CBS skill platform to complete the configuration of skill robot. Then you can configure various skills for the robot according to different needs, to achieve multi-round dialogue ability in different scenarios.

Finally:

Mid-Autumn + National Day long holiday is about to start, bless the developers, Huawei cloud community users, read this article everyone, happy double festival, eat fun.

Log in huawei cloud community, you can download the detailed development steps of poetry robot for free (including poetry entry file)

[Part of this article is reprinted from the public account HyperAI HyperAI.]

Click to follow, the first time to learn about Huawei cloud fresh technology ~