QandNChatBot / main.py
faizanmumtaz's picture
Update main.py
dae8358
from langchain.llms import HuggingFaceHub,OpenAI
import streamlit as st
def get_openai_response(question):
llm=OpenAI(model_name="gpt-3.5-turbo",temperature=0)
return llm(question)
st.set_page_config(page_title="Q&N ChatBot")
st.header("LangChain Application")
input = st.text_input("Input: ",key="input")
response=get_openai_response(input)
submit = st.button("Ask the question")
if submit:
st.subheader("The Response is")
st.write(response)