build-your-own-rag-chatbot
/
app_2.py
20 строк · 605.0 Байт
1import streamlit as st2
3# Draw a title and some markdown
4st.title("Your personal Efficiency Booster")5st.markdown("""Generative AI is considered to bring the next Industrial Revolution.6Why? Studies show a **37% efficiency boost** in day to day work activities!""")7
8# Draw the chat input box
9if question := st.chat_input("What's up?"):10
11# Draw the user's question12with st.chat_message('human'):13st.markdown(question)14
15# Generate the answer16answer = f"""You asked: {question}"""17
18# Draw the bot's answer19with st.chat_message('assistant'):20st.markdown(answer)21