iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
☕️

Creating a Machine Learning Dataset for How to Brew Cafe au Lait

に公開

Introduction

I'm having fun actually running models in the Amazon Bedrock Playground!
https://zenn.dev/yasuna/articles/cc99387fcd3989

What I want to try next is to create a model using data I've prepared myself.

This time, I'm going to create a café au lait brewing dataset by turning information from the website of the coffee shop where I work as an engineer into a Q&A format.

This was my first time creating a dataset for machine learning, but by asking questions using ChatGPT, it easily outputted the code to create the dataset.

I was then able to run that code in Python and create the dataset as a CSV file.

Below, I'll introduce the workflow until the dataset was created.

Creating the Café au Lait Brewing Dataset

Let's create a dataset for how to brew café au lait.

We'll be creating the dataset in CSV format this time.
I'll go ahead and ask ChatGPT right away.

Converting Data to Q&A Format with ChatGPT

I'll be creating the Q&A from the following article.
https://fukusukecoffee.com/magazine/how-to-brew/iced-cafe-au-lait/

I'll copy the body text and paste it into ChatGPT.

(Paste the body text)
Based on the text above, please come up with 20 questions and answers and output them in CSV format.

Then

The output is cut off, but it separated the questions and answers like this.
However, with just this, it's not clear that these are questions and answers about café au lait.
So, I had it add a café au lait label as well.

I was able to add classification labels for café au lait!

Running the Code from the Command Line

Next, I'll run the code provided by ChatGPT using Python.

The CSV file containing the Q&A for how to brew café au lait was output in an instant!
It's a fantastic result.

Summary

I extracted text information from a web page, converted the data into a Q&A format using ChatGPT, and created a CSV file for the dataset.

I want to gather more data on how to brew coffee and train models with it in the future!
Below is the GitHub repository for the café au lait brewing dataset.
https://github.com/YasunaCoffee/brew-dataset

GitHubで編集を提案

Discussion