Skip to content

Latest commit

 

History

History

haiku-generator-ts

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Haiku Generator

This repository contains a Spin application that generates a haiku in the 5-7-5 format and a simple UI to interact with it.

Please check the repo's README for prerequisites for running this example.

Build and Running

$ npm install 
$ spin build --up

Note: If you are using the Cloud GPU component, remember to reference the runtime-config.toml file, e.g.: spin build --up --runtime-config-file ./runtime-config.toml.

You can access the UI at http://localhost:3000 and use the web interface or you can use the following curl command:

curl -X POST http://localhost:3000/api/haiku-writing -H 'Content-Type: application/json' -d '{"sentence":"ChatGPT"}'

Deploy the application to Fermyon Cloud

$ cd api
$ spin deploy