File size: 480 Bytes
3a66a27
43dad90
1c5a2c6
 
 
 
 
 
 
 
cf012cb
1c5a2c6
3a66a27
 
43dad90
 
 
491741a
1c5a2c6
491741a
1c5a2c6
0c9f179
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import streamlit as st
import os 
from transformers import pipeline
from bardapi import Bard 
import os 

bardkey = os.environ.get("BARD_API_KEY")

bard = Bard(token=bardkey)


# convo = pipeline("conversational")



def chatbot():
    st.title("ChatBot")
    if message := st.chat_input("Enter your message"):
        umsg = bard.get_answer(message)["content"]
        with st.chat_message("assistant"):
            st.write(umsg)
            
            
            
chatbot()