Ankush05 commited on
Commit
dea421c
1 Parent(s): 1bcbbca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -1,6 +1,8 @@
1
  import streamlit as st
2
  from bardapi import Bard
3
- import os
 
 
4
 
5
  uri = os.environ["BARD_API_KEY"]
6
  bard = Bard(token = uri)
@@ -8,11 +10,12 @@ bard = Bard(token = uri)
8
 
9
  def Chatbot():
10
  st.title("Chatbot")
11
- if query := st.chat_input("enter your message"):
12
- umsg = bard.get_answer(query)
 
13
 
14
- with st.chat_message("Assistant"):
15
- st.write(umsg["content"])
16
 
17
  Chatbot()
18
 
 
1
  import streamlit as st
2
  from bardapi import Bard
3
+ import os
4
+
5
+ st.set_page_config(layout="wide")
6
 
7
  uri = os.environ["BARD_API_KEY"]
8
  bard = Bard(token = uri)
 
10
 
11
  def Chatbot():
12
  st.title("Chatbot")
13
+ 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.")
14
+ bardans = bard.get_answer(advice_input)['content']
15
+ 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"]
16
 
17
+ with st.chat_message("assistant"):
18
+ st.write(f"What to be done to achieve better education:\n{bardans\nHow we can:\n{anslist")
19
 
20
  Chatbot()
21