Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sidebar links #68

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,28 @@ OPENAI_API_KEY='xxxxxxxxxx'

## Run it locally

1. Open a terminal and navigate to your project folder.
2. Copy the following code in your terminal
### For Windows Powershell

```sh
python -m venv .venv
.venv\Scripts\Activate.ps1
pip install -r requirements.txt
streamlit run Chatbot.py
```
### For Windows Command Prompt

```sh
python -m venv .venv
.venv\Scripts\activate.bat
pip install -r requirements.txt
streamlit run Chatbot.py
```
### For MacOS/Linux

```sh
virtualenv .venv
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run Chatbot.py
Expand Down
2 changes: 2 additions & 0 deletions pages/3_Langchain_Quickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
with st.sidebar:
openai_api_key = st.text_input("OpenAI API Key", type="password")
"[Get an OpenAI API key](https://platform.openai.com/account/api-keys)"
"[View the source code](https://github.com/streamlit/llm-examples/blob/main/pages/3_Langchain_Quickstart.py)"
"[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)"


def generate_response(input_text):
Expand Down
7 changes: 6 additions & 1 deletion pages/4_Langchain_PromptTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@

st.title("🦜🔗 Langchain - Blog Outline Generator App")

openai_api_key = st.sidebar.text_input("OpenAI API Key", type="password")
with st.sidebar:
openai_api_key = st.text_input("OpenAI API Key", key="feedback_api_key", type="password")
"[Get an OpenAI API key](https://platform.openai.com/account/api-keys)"
"[View the source code](https://github.com/streamlit/llm-examples/blob/main/pages/4_Langchain_PromptTemplate.py)"
"[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/streamlit/llm-examples?quickstart=1)"



def blog_outline(topic):
Expand Down