Deep_Learning / app.py
corvo7's picture
Update app.py
5c0ad18 verified
import streamlit as st
import openai
import os
os.environ["OPENAI_API_KEY"]="sk-proj-uHasdgbriPPlFMm99ZtJT3BlbkFJOl231YfdxCSNmQjVEpMX"
st.header("Intro to Deep learining")
st.subheader("What is AI")
st.markdown("""AI stands for artificail Intelligence,In a simple term we can define AI as a huge field where we are going to make machine's mimic
human intelligence.
As we know we human beigns are having Natural Intelligence using which we are able to perform day to day task.This intelligence gave
us two important features (Broadly) they are
1) Learning
2) Thinking
So AI field is giving us three tools and technqiues they are
1) ML (Machine Learning)
2) DL (Deep Learning)
3) Gen-AI (Generative AI)""")
st.markdown("""So by using the above three tools we can mimic/copy the learning and thinking skills of human beign to machine .So that they also can
Learn and Generate from the data""")
if st.button("Click to know more about What is Data "):
responds=openai.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "you are a very good assistant"},# set the behaviour of
{"role": "user", "content": "What is Data in machine learningn and deep learning"}
],
temperature=0.5,
max_tokens=500
)
st.write(responds.choices[0].message.content)
st.markdown("""So now let's talk about how to make machine mimic learning skills from Data""")
st.markdown("""So we human beigns learn's from our experinece.But machine requires data to learn from.""")
st.markdown("""Here what is machine learning,machine's is here is trying to learn the actual realtionship between
the input features and the output classes from the data.""")
st.markdown("""Mathematically its nothing but the below formula""")
st.markdown(""" y=f(x)""")
st.markdown(""" where y is the output variable(classes) and x is the feature variable (features) and f is the learned relationship between x and y""")
if st.button("Example "):
responds=openai.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "you are a very good assistant"},# set the behaviour of
{"role": "user", "content": "Give an simple example based on y=f(x) function in ml or dl no code on a data "}
],
temperature=0.5,
max_tokens=500
)
st.write(responds.choices[0].message.content)
if st.button("Answer from gpt"):
responds=openai.chat.completions.create(
model="gpt-3.5-turbo",
messages=[
{"role": "system", "content": "you are a very good assistant"},# set the behaviour of
{"role": "user", "content": "What do we mean by ai"}
],
temperature=0.5,
max_tokens=500
)
st.write(responds.choices[0].message.content)
else:
st.write(" ")