Spaces:
Paused
Paused
File size: 863 Bytes
99709e3 24c1914 ac04983 99709e3 24c1914 99709e3 24c1914 ac04983 24c1914 ac04983 24c1914 ac04983 24c1914 ac04983 24c1914 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
## Difference between Open AI and hugging face
import streamlit as st
from dotenv import load_dotenv
load_dotenv()
from langchain_openai import OpenAI
llm = OpenAI()
def load_Answer(inputtext):
result= llm(inputtext)
return result
st.set_page_config(
page_title="My Chat GPT",
page_icon="🧊",
layout="wide",
initial_sidebar_state="expanded",
menu_items={
'Get Help': 'https://www.extremelycoolapp.com/help',
'Report a bug': "https://www.extremelycoolapp.com/bug",
'About': "# This is a header. This is an *extremely* cool app!"
}
)
st.header('This is a header')
def get_text():
i= st.text_input("You: ", key="input")
return i
user_input = get_text()
response = load_Answer(user_input)
submit = st.button("Submit")
if submit:
st.subheader("Answer:")
st.write(response)
|