aws-samples / aws-samples/amazon-bedrock-prompting

Error

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
76
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Hello,

Can anybody help me with this error please?

The app.py created here in this notebook has a reference to::
https://github.com/aws-samples/amazon-bedrock-prompting/blob/main/auto_prompting/auto-prompting.ipynb
has a reference to this on line 2
`from streamlit_chat import message`

Here is the console output when running:

```
(venv) jason@JiMini auto_prompting % streamlit run app.py

You can now view your Streamlit app in your browser.

Local URL: http://localhost:8501
Network URL: http://192.168.1.153:8501

For better performance, install the Watchdog module:

$ xcode-select --install
$ pip install watchdog

2023-09-14 04:50:44.670 Uncaught app exception
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/Users/jason/Downloads/content/amazon-bedrock-prompting/auto_prompting/app.py", line 2, in
from streamlit_chat import message
ModuleNotFoundError: No module named 'streamlit_chat'
2023-09-14 04:50:54.146 Uncaught app exception
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/Users/jason/Downloads/content/amazon-bedrock-prompting/auto_prompting/app.py", line 2, in
from streamlit_chat import message
ModuleNotFoundError: No module named 'streamlit_chat'
```

Note that I do not see the streamlit_chat in the code downloaded from this repo, so perhaps I missed it?

Also, I tried to move forward with the example by simply replacing the import with a message of my choosing.
This causes other issues to appear in terms of dependencies and I noticed that the notebook does have the installation of dependencies commented out for the moment, so perhaps there are additional issues with this example that need to be addressed? If you have an example of how to make this streamlit example work on macos that uses AWS SSO login for credentials, that would be fantastic.

Thank you.

Contributor guide

Open the contributing guide

Research direction

Start by comparing auto_prompting/app.py with auto-prompting.ipynb, especially line 2 and the commented dependency installation, then reproduce the import failure in the repository environment. Done means the Streamlit example launches with its required dependencies and the macOS/AWS SSO setup is documented, or the missing prerequisites are explicitly identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, jupyter-notebook, python, streamlit
Domain
ai, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.