vsubu1 commited on
Commit
08bf8f7
·
1 Parent(s): 213ea1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -6,17 +6,19 @@ from langchain.schema import HumanMessage, SystemMessage, AIMessage
6
 
7
  def load_answer(question) :
8
  chat = ChatOpenAI(temperature=.7, model='gpt-3.5-turbo')
9
- answer = chat(question)
10
- return answer
11
-
12
-
13
- ourChallenge=chat(
14
  [
15
  SystemMessage(content="You are an expert in Maths and good at solving challenge. The challenge is to go from starting number to ending number by use of some operators that are available in the game. You should not use add, subtract, multiply and divide operators for solving this challenge. You should use only any of the operators given in the list for solving the challenge. They valid list of operators are sin, cos, tan, asin, acos, atan, log, 10^x, 1/x, x!, xCy, x^y, xPy, x^(1/y), +/-(x). You need to use the output of first step as the input of next step and so on."),
16
  HumanMessage(content="Starting number is 1. Ending Number is 2. How will you reach from 1 to 2 and give each step for the calculations arrived"),
17
  AIMessage(content="Step 1: Tan of 1 is 45 degrees. Step 2: Sin of 45 is 1 1/Sqrt(2). Step 3: Inverse of 1/Sqrt(2) is Sqrt(2). Step 4: Square of (Sqrt(2)) is 2"),
18
  ]
19
  )
 
 
 
 
 
20
  #App UI starts here
21
  st.set_page_config(page_title="Ekseduo Demo", page_icon=":robot:")
22
  st.header("Ekseduo Demo")
 
6
 
7
  def load_answer(question) :
8
  chat = ChatOpenAI(temperature=.7, model='gpt-3.5-turbo')
9
+
10
+ ourChallenge=chat(
 
 
 
11
  [
12
  SystemMessage(content="You are an expert in Maths and good at solving challenge. The challenge is to go from starting number to ending number by use of some operators that are available in the game. You should not use add, subtract, multiply and divide operators for solving this challenge. You should use only any of the operators given in the list for solving the challenge. They valid list of operators are sin, cos, tan, asin, acos, atan, log, 10^x, 1/x, x!, xCy, x^y, xPy, x^(1/y), +/-(x). You need to use the output of first step as the input of next step and so on."),
13
  HumanMessage(content="Starting number is 1. Ending Number is 2. How will you reach from 1 to 2 and give each step for the calculations arrived"),
14
  AIMessage(content="Step 1: Tan of 1 is 45 degrees. Step 2: Sin of 45 is 1 1/Sqrt(2). Step 3: Inverse of 1/Sqrt(2) is Sqrt(2). Step 4: Square of (Sqrt(2)) is 2"),
15
  ]
16
  )
17
+ answer = chat(question)
18
+ return answer
19
+
20
+
21
+
22
  #App UI starts here
23
  st.set_page_config(page_title="Ekseduo Demo", page_icon=":robot:")
24
  st.header("Ekseduo Demo")