Giter Club home page Giter Club logo

aws-bedrock-demo's Introduction

AWS Bedrock Demo Script

A simple Python script example showing how to use AWS bedrock via the Python SDK.

To use this you'll first need also need to have the AWS CLI already installed and configured.

You'll also need to enable the Claude, Jurassic and Stability models in your AWS account. These all use the AWS us-east-1 region.

Generate Text Content Using Claude AI

python generate_text_claude.py

Update the prompt_data variable to change what it generates.

prompt_data = """
What are the top 3 benefits of cloud computing?
"""

Example output:

Cloud computing provides scalability, flexibility, and cost savings by delivering on-demand compute resources, applications, and storage over the internet.
prompt_data = """
Write a one-liner 90s style B-movie horror/comedy pitch about
a giant man-eating Python,
with a hilarious and surprising twist.
"""

Example output:

When a genetically-engineered 30-foot python escapes from a research facility and terrorizes a small town, it's up to a plucky teen who can inexplicably speak to snakes, a bumbling sheriff afraid of danger, and a kooky pet psychic to stop the beast before it swallows up the entire senior prom in one gulp.
```

## Generate Text Content Using Jurassic

```sh
python generate_text_j2.py

Example output:

Cloud computing provides on-demand access to a shared pool of computing resources, enabling scalable, flexible, and cost-effective IT solutions.

Generate Image Using Stable Diffusion XL

python generate_image.py

Update the prompt_data variable to change what it generates.

prompt_data = """
A high-red 4k HDR photo of a golden retriever puppy running on a beach.
Action shot, blue sky, white sand, and a big smile. Cinematic film quality.
"""

They'll be generated to the output directory.

Example outputs:

Puppy Image 1

Puppy Image 2

aws-bedrock-demo's People

Contributors

pixegami avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.