File size: 458 Bytes
040ad7c
de66a20
 
9013fef
de66a20
 
 
d9a5537
 
 
de66a20
d9a5537
 
 
 
 
de66a20
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from hugchat import hugchat
import streamlit as st

chatbot = hugchat.ChatBot(cookie_path="home/user/cookies.json")
with st.chat_message:
    st.markdown(chatbot.chat("Hi"))
    
# Create a new conversation
id = chatbot.new_conversation()
chatbot.change_conversation(id)

# Get conversation list
conversation_list = chatbot.get_conversation_list()
uinput = st.chat_input("How can I help you?")
with st.chat_message:
    st.markdown(chatbot.chat(uinput))