Rajagopal commited on
Commit
8d77a28
·
1 Parent(s): 6021af7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -0
app.py CHANGED
@@ -59,6 +59,25 @@ if st.button("Ask Questions "):
59
  st.write(response)
60
 
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  if st.button("Ask trying here "):
63
  template = """
64
  You are an expert on topics of Sustainability, Climate action and UN Sustainable Development Goals.
 
59
  st.write(response)
60
 
61
 
62
+ if st.button("Ask Questions Simplify "):
63
+ template = """
64
+ You are an AI assistant.
65
+ {concept}
66
+ """
67
+
68
+ response = openai.ChatCompletion.create(
69
+ engine="gpt-35-turbo",
70
+ messages = [{"role":"system","content":"You are an AI assistant that helps people find information. Please explain the information like i am a five."},{"role":"user","content":yourquestion}],
71
+ temperature=0,
72
+ max_tokens=800,
73
+ top_p=1,
74
+ frequency_penalty=0,
75
+ presence_penalty=0,
76
+ stop=None)
77
+
78
+ # Run the chain only specifying the input variable.
79
+ st.write(response)
80
+
81
  if st.button("Ask trying here "):
82
  template = """
83
  You are an expert on topics of Sustainability, Climate action and UN Sustainable Development Goals.