File size: 565 Bytes
c43eadc fc6fa0a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import streamlit as st
import requests
import datetime
st.header("#CodeWars localGPT", divider='rainbow')
option = st.selectbox('What is your role?', ('Support', 'Sales'))
st.write('You selected', option)
prompt = st.chat_input("Say something to our #CodeWars bot...")
if prompt:
with st.chat_message(option):
st.write(f"{datetime.datetime.now()} :red[{option}:] ", prompt)
response = requests.get("https://dummyjson.com/products/1").text
with st.chat_message("Bot"):
st.write(f"{datetime.datetime.now()}", response) |