CosmoAI commited on
Commit
de66a20
·
1 Parent(s): 8511ea1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,9 +1,17 @@
1
  from hugchat import hugchat
 
 
2
  chatbot = hugchat.ChatBot(cookie_path="cookies.json")
3
- print(chatbot.chat("Hi"))
 
 
4
  # Create a new conversation
5
  id = chatbot.new_conversation()
6
  chatbot.change_conversation(id)
 
7
  # Get conversation list
8
  conversation_list = chatbot.get_conversation_list()
9
- print(chatbot.chat("what is the most important thing to know as a human"))
 
 
 
 
1
  from hugchat import hugchat
2
+ import streamlit as st
3
+
4
  chatbot = hugchat.ChatBot(cookie_path="cookies.json")
5
+ with st.chat_message:
6
+ st.markdown(chatbot.chat("Hi"))
7
+
8
  # Create a new conversation
9
  id = chatbot.new_conversation()
10
  chatbot.change_conversation(id)
11
+
12
  # Get conversation list
13
  conversation_list = chatbot.get_conversation_list()
14
+ uinput = st.chat_input("How can I help you?")
15
+ with st.chat_message:
16
+ st.markdown(chatbot.chat(uinput))
17
+