File size: 984 Bytes
c9e6e83
c814baf
dea421c
 
 
c9e6e83
1b4ff7f
fa7995a
c9e6e83
c814baf
c9e6e83
 
7b7ab10
dea421c
 
c9e6e83
dea421c
7d0bbc9
c9e6e83
aea51ec
c814baf
e6aa206
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st
from bardapi import Bard 
import os

st.set_page_config(layout="wide")

uri = os.environ["BARD_API_KEY"]
bard = Bard(token = uri)


def Chatbot():
    st.title("Chatbot")
    if advice_input := st.chat_input("Measures for better education ecosystem in India. e.g: how we can education  wiil be more accessible, affordable & promote innovation. Comments shall be specific & factful."):
        bardans = bard.get_answer(advice_input)['content']
        anslist = bard.get_answer(f"Make a list of suggestions: \n{bardans} n\for the betterment education: \n{advice_input}\n\nThe list should be in three sections, section 1 for quality of education, section 2 for relevance of job oriented education & section 3 for pro & cons of linking Artifical intelligence with education system.")["content"]

        with st.chat_message("assistant"):
            st.write(f"What to be done to achieve better education:\n{bardans\nHow we can:\n{anslist}")

Chatbot()