File size: 626 Bytes
040ad7c de66a20 3ddd352 b593708 3ddd352 de66a20 3ddd352 de66a20 3ddd352 de66a20 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
from hugchat import hugchat
import streamlit as st
cookie_path = 'cookies.json'
chatbot = hugchat.ChatBot(cookie_path=cookie_path)
response = chatbot.start_conversation('Hello!')
print(response)
# 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))
|