Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,7 @@ openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
36 |
|
37 |
|
38 |
|
39 |
-
st.title("
|
40 |
|
41 |
|
42 |
|
@@ -88,6 +88,28 @@ if st.button("Visuvalize for ideas "):
|
|
88 |
|
89 |
st.image(image_url, width = 512)
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
|
93 |
if st.button("Ask Questions Simplify "):
|
@@ -109,6 +131,10 @@ if st.button("Ask Questions Simplify "):
|
|
109 |
# Run the chain only specifying the input variable.
|
110 |
st.write(response)
|
111 |
|
|
|
|
|
|
|
|
|
112 |
if st.button("Ask trying here "):
|
113 |
template = """
|
114 |
You are an expert on topics of Sustainability, Climate action and UN Sustainable Development Goals.
|
|
|
36 |
|
37 |
|
38 |
|
39 |
+
st.title(" ideate sustainabile product designs with AI")
|
40 |
|
41 |
|
42 |
|
|
|
88 |
|
89 |
st.image(image_url, width = 512)
|
90 |
|
91 |
+
|
92 |
+
if st.button("Simplify ideas "):
|
93 |
+
template = """
|
94 |
+
You are an AI assistant.
|
95 |
+
{concept}
|
96 |
+
"""
|
97 |
+
|
98 |
+
yourquestionideas = "Tell me a creative idea of " + yourquestion + " like i am a ten"
|
99 |
+
|
100 |
+
response = openai.ChatCompletion.create(
|
101 |
+
engine="gpt-35-turbo",
|
102 |
+
messages = [{"role":"system","content":"You are an AI assistant that can come up with creative product ideas."},{"role":"user","content":yourquestionideas}],
|
103 |
+
temperature=0.99,
|
104 |
+
max_tokens=800,
|
105 |
+
top_p=1,
|
106 |
+
frequency_penalty=0,
|
107 |
+
presence_penalty=0,
|
108 |
+
stop=None)
|
109 |
+
|
110 |
+
# Run the chain only specifying the input variable.
|
111 |
+
st.write(response)
|
112 |
+
|
113 |
|
114 |
|
115 |
if st.button("Ask Questions Simplify "):
|
|
|
131 |
# Run the chain only specifying the input variable.
|
132 |
st.write(response)
|
133 |
|
134 |
+
|
135 |
+
|
136 |
+
|
137 |
+
|
138 |
if st.button("Ask trying here "):
|
139 |
template = """
|
140 |
You are an expert on topics of Sustainability, Climate action and UN Sustainable Development Goals.
|