anant23's picture
Update app.py
232a85b verified
raw
history blame
489 Bytes
import os
import streamlit as st
from langchain.llms import OpenAI
def return_response(question):
llm = OpenAI(model='gpt-3.5-turbo-instruct',temperature=0.6)
response = llm.invoke(question)
return response
st.set_page_config(page_title='Q & A')
st.header('langchain app')
question = st.text_input('Input: ',key='input')
response = return_response(question)
submit = st.button("your question here")
if submit:
st.subheader('Response is: ')
st.write(response)