【 Abstract 】 Hello everyone, today is Tanabata Festival, in order to enhance the feelings between my girlfriend, I wrote an automatic generation of love poetry AI; You can try to reproduce the model in ModelArts and send it to your girlfriend
Hello, everyone. I am Xiao Pei, the chief teacher of UP station B, mainly working on AI related algorithms.
Today we bring you a love poem automatically generated by AI, go send it to your girlfriend! (At the end of the article for you to prepare a welfare oh, do not miss)!
1. Enter huawei cloud official website and find ModelArts under EI enterprise intelligence
2. Access the console
3. Click the user guide in the upper right corner
4. Click on my credentials
5. Add an access key
6. Return to the console and click Global Settings
7. Add an access key
8. Click on the Development environment’s Notebook
9. Create the Notebook environment
10. After the Notebook is started, open it
11. Create a terminal and run conda init to initialize the environment
12. Run conda info –envs to view the Conda environment
13. Activate Tensorflow
14. Install keras
15. Install Tensorflow 2.2.0
16. Create a New Notebook script (select Tensorflow)
17. Import required packages and modules
18. Write text processing functions
19. Upload the data file
20. Select the Shakespeare poetry collection data file
21. Create a new folder and rename it Models
22. Upload the pre-trained data file under the Models folder
23. Set relevant parameters and load the pre-training model
24. Training model
25. Model training completed, give the beginning, start to generate text!
26. Poetry generation completed!
The attachment provides complete codes and data, including English and Chinese versions. In order to thank you for your support, I have prepared welfare and lucky draw for you. Welcome to participate:
Code attachment:
Shakespeare_generator.zip5.54 MB
Poems_generator_Keras.zip11.05 MB
Click to follow, the first time to learn about Huawei cloud fresh technology ~