Content
# Gradio and Amazon Bedrock Integration Project
This project is built from scratch to provide a simple front-end interface using Gradio and to perform model inference using the Amazon Bedrock API.
## Project Structure
- **README.md**: Project description and documentation.
- **pyproject.toml**: Configuration file for the Python project, containing dependency package information used by uv.
- **requirements.txt**: List of dependency packages used by traditional pip.
- **config/config.json**: Configuration file for Amazon Bedrock.
Please specify the Bedrock API endpoint and API key.
- **src/frontend.py**: Implementation of the front end using Gradio.
It receives user input, queries the model, and displays the results.
- **src/bedrock.py**: Responsible for communication with Amazon Bedrock.
It reads information from the configuration file and sends API requests.
If the endpoint is not set, it returns a simulated response.
- **src/mcp_tools/**: Implementation of the Model Context Protocol (MCP) server.
Provides tools to fetch content from websites.
## Setup
### Using uv (recommended)
1. Please install uv:
```
pip install uv
```
2. Please install the dependency packages:
```
uv pip sync pyproject.toml
```
3. If you also want to install development dependencies:
```
uv pip sync pyproject.toml --extras dev
```
4. Update `config/config.json` to match your Amazon Bedrock settings:
```json
{
"bedrock_endpoint": "YOUR_BEDROCK_ENDPOINT",
"api_key": "YOUR_API_KEY"
}
```
5. Start the Gradio interface:
```
uv run python src/frontend.py
```
### Using traditional pip
1. Please install the required packages:
```
pip install -r requirements.txt
```
2. Update `config/config.json` to match your Amazon Bedrock settings:
```json
{
"bedrock_endpoint": "YOUR_BEDROCK_ENDPOINT",
"api_key": "YOUR_API_KEY"
}
```
3. Start the Gradio interface:
```
python src/frontend.py
```
## Usage
Please enter your query in the text box displayed in the Gradio UI. The input will be sent to Amazon Bedrock via `src/bedrock.py`, and the results will be displayed on the screen.
## Notes
- If the `bedrock_endpoint` is not set, a simulated response will be returned.
- Please ensure that the API credentials and network settings are correctly configured.
Feel free to use it.
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.