build-your-own-rag-chatbot

Форк
0
20 строк · 605.0 Байт
1
import streamlit as st
2

3
# Draw a title and some markdown
4
st.title("Your personal Efficiency Booster")
5
st.markdown("""Generative AI is considered to bring the next Industrial Revolution.  
6
Why? Studies show a **37% efficiency boost** in day to day work activities!""")
7

8
# Draw the chat input box
9
if question := st.chat_input("What's up?"):
10
    
11
    # Draw the user's question
12
    with st.chat_message('human'):
13
        st.markdown(question)
14

15
    # Generate the answer
16
    answer = f"""You asked: {question}"""
17

18
    # Draw the bot's answer
19
    with st.chat_message('assistant'):
20
        st.markdown(answer)
21

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.