lorentz commited on
Commit
9ec3978
1 Parent(s): 1de7d7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -8,30 +8,30 @@ from langchain.llms import OpenAI
8
 
9
  #Function to return the response
10
  def load_answer(question):
11
- llm = OpenAI(model_name="text-davinci-003",temperature=0)
12
  answer=llm(question)
13
  return answer
14
 
15
 
16
  #App UI starts here
17
- st.set_page_config(page_title="LangChain Demo", page_icon=":robot:")
18
- st.header("LangChain Demo")
19
 
20
  #Gets the user input
21
- def get_text():
22
- input_text = st.text_input("You: ", key="input")
23
  return input_text
24
 
25
 
26
- user_input=get_text()
27
  response = load_answer(user_input)
28
 
29
- submit = st.button('Generate')
30
 
31
  #If generate button is clicked
32
  if submit:
33
 
34
- st.subheader("Answer:")
35
 
36
  st.write(response)
37
 
 
8
 
9
  #Function to return the response
10
  def load_answer(question):
11
+ llm = OpenAI(model_name="gpt-3.5-turbo",temperature=0)
12
  answer=llm(question)
13
  return answer
14
 
15
 
16
  #App UI starts here
17
+ st.set_page_config(page_title="Entz's LLM LangChain Base Model", page_icon=":ant:")
18
+ st.header("Entz's LLM LangChain Base Model")
19
 
20
  #Gets the user input
21
+ def question():
22
+ input_text = st.text_input("Enter your questions: ", key="input")
23
  return input_text
24
 
25
 
26
+ user_input = question()
27
  response = load_answer(user_input)
28
 
29
+ submit = st.button('Chat-gbt3-turbo Answer')
30
 
31
  #If generate button is clicked
32
  if submit:
33
 
34
+ st.subheader("Chat-gbt3-turbo:")
35
 
36
  st.write(response)
37