Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,4 @@
|
|
1 |
-
#Hello! It seems like you want to import the Streamlit library in Python. Streamlit is a powerful open-source framework used for building web applications with interactive data visualizations and machine learning models. To import Streamlit, you'll need to ensure that you have it installed in your Python environment.
|
2 |
-
#Once you have Streamlit installed, you can import it into your Python script using the import statement,
|
3 |
-
|
4 |
import streamlit as st
|
5 |
-
|
6 |
-
|
7 |
from langchain.llms import OpenAI
|
8 |
|
9 |
#Function to return the response
|
@@ -14,24 +9,24 @@ def load_answer(question):
|
|
14 |
|
15 |
|
16 |
#App UI starts here
|
17 |
-
st.set_page_config(page_title="Entz's LLM LangChain
|
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
|
23 |
return input_text
|
24 |
|
25 |
|
26 |
user_input = question()
|
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 |
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
|
|
|
|
2 |
from langchain.llms import OpenAI
|
3 |
|
4 |
#Function to return the response
|
|
|
9 |
|
10 |
|
11 |
#App UI starts here
|
12 |
+
st.set_page_config(page_title="Entz's LLM LangChain-gpt-3.5-turbo", page_icon=":ant:")
|
13 |
st.header("Entz's LLM LangChain Base Model")
|
14 |
|
15 |
#Gets the user input
|
16 |
def question():
|
17 |
+
input_text = st.text_input("Enter your question: ", key="input")
|
18 |
return input_text
|
19 |
|
20 |
|
21 |
user_input = question()
|
22 |
response = load_answer(user_input)
|
23 |
|
24 |
+
submit = st.button('Entz AI Answer')
|
25 |
|
26 |
#If generate button is clicked
|
27 |
if submit:
|
28 |
|
29 |
+
st.subheader("According to Entz AI:")
|
30 |
|
31 |
st.write(response)
|
32 |
|