|
|
|
|
|
|
|
import streamlit as st |
|
|
|
|
|
from langchain.llms import OpenAI |
|
|
|
|
|
def load_answer(question): |
|
llm = OpenAI(model_name="gpt-3.5-turbo",temperature=0) |
|
answer=llm(question) |
|
return answer |
|
|
|
|
|
|
|
st.set_page_config(page_title="Entz's LLM LangChain Base Model", page_icon=":ant:") |
|
st.header("Entz's LLM LangChain Base Model") |
|
|
|
|
|
def question(): |
|
input_text = st.text_input("Enter your questions: ", key="input") |
|
return input_text |
|
|
|
|
|
user_input = question() |
|
response = load_answer(user_input) |
|
|
|
submit = st.button('Chat-gbt3-turbo Answer') |
|
|
|
|
|
if submit: |
|
|
|
st.subheader("Chat-gbt3-turbo:") |
|
|
|
st.write(response) |
|
|
|
|