Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
yashppawar committed Dec 28, 2021
1 parent 13e8e54 commit d7a4e6e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# st-chat

Streamlit Component, for a Chat bot UI
Streamlit Component, for a Chat-bot UI, [example app](https://share.streamlit.io/ai-yash/st-chat/main/examples/chatbot.py)

authors - [@yashppawar](https://github.com/yashppawar) & [@YashVardhan-AI](https://github.com/yashvardhan-ai)

## Installation
Expand Down
8 changes: 8 additions & 0 deletions examples/chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
from streamlit_chat import message
import requests

st.set_page_config(
page_title="Streamlit Chat - Demo",
page_icon=":robot:"
)

API_URL = "https://api-inference.huggingface.co/models/facebook/blenderbot-400M-distill"
headers = {"Authorization": st.secrets['api_key']}

st.header("Streamlit Chat - Demo")
st.markdown("[Github](https://github.com/ai-yash/st-chat")

if 'generated' not in st.session_state:
st.session_state['generated'] = []

Expand Down

0 comments on commit d7a4e6e

Please sign in to comment.