Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/build-on-aws/amazon-bedrock-quick-start
Learn how to Quickly build Generative AI applications with Amazon Bedrock
https://github.com/build-on-aws/amazon-bedrock-quick-start
amazon-bedrock aws generative-ai python streamlit
Last synced: 7 days ago
JSON representation
Learn how to Quickly build Generative AI applications with Amazon Bedrock
- Host: GitHub
- URL: https://github.com/build-on-aws/amazon-bedrock-quick-start
- Owner: build-on-aws
- License: mit-0
- Created: 2023-09-28T16:36:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-04T15:13:08.000Z (7 months ago)
- Last Synced: 2024-04-04T16:44:29.007Z (7 months ago)
- Topics: amazon-bedrock, aws, generative-ai, python, streamlit
- Language: Python
- Homepage: https://community.aws/posts/amazon-bedrock-quick-start
- Size: 1.42 MB
- Stars: 42
- Watchers: 6
- Forks: 20
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Quickly build Generative AI applications with Amazon Bedrock
This repository contains code samples for building diverse AI applications using Amazon Bedrock's foundation models. Learn how to accelerate projects in image and text generation and beyond.
## Getting Started
To get a local copy up and running, follow these simple steps.
### Prerequisites
* Python 3.9 or higher
* pip
* [Model Access in Amazon Bedrock](https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/modelaccess)### Installation
Clone the repo
```bash
git clone https://github.com/build-on-aws/amazon-bedrock-quick-start.git
```Install required packages
```bash
pip install -r requirements.txt
```## Usage
This repository contains various code samples demonstrating how to build AI applications using Amazon Bedrock's foundation models. Here's how to use each:
### Image Generation
To generate images using Stable Diffusion, run the following command:
```bash
streamlit run sd_sample_st.py
```This will launch a Streamlit app where you can enter text prompts to generate corresponding images.
### Text Examples
Run this Python script to see different text-based applications like text summarization, code generation, and Q&A:
```bash
python text_examples.py
```This script will output results for each of these applications, showcasing the versatility of foundation models in text-based tasks.
### Chatbot
To interact with a chatbot built using Amazon Bedrock, LangChain, and Streamlit, run:
```bash
streamlit run chat_bedrock_st.py
```This launches a Streamlit app where you can have a conversation with the chatbot, witnessing AI-powered conversational capabilities firsthand.
### RAG Example
To see how Retrieval Augmented Generation (RAG) works with LangChain, execute:
```bash
python rag_example.py
```This will demonstrate how RAG augments foundation models by retrieving and incorporating external data into the generated content.
## Security
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
## License
This library is licensed under the MIT-0 License. See the LICENSE file.