Update app.py
Browse files
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="
|
12 |
answer=llm(question)
|
13 |
return answer
|
14 |
|
15 |
|
16 |
#App UI starts here
|
17 |
-
st.set_page_config(page_title="LangChain
|
18 |
-
st.header("LangChain
|
19 |
|
20 |
#Gets the user input
|
21 |
-
def
|
22 |
-
input_text = st.text_input("
|
23 |
return input_text
|
24 |
|
25 |
|
26 |
-
user_input=
|
27 |
response = load_answer(user_input)
|
28 |
|
29 |
-
submit = st.button('
|
30 |
|
31 |
#If generate button is clicked
|
32 |
if submit:
|
33 |
|
34 |
-
st.subheader("
|
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 |
|