Update app.py
Browse files
app.py
CHANGED
@@ -32,6 +32,8 @@ openai.api_key = os.environ["OPENAI_API_KEY"]
|
|
32 |
st.title("Wipro demo with azure cognitive ")
|
33 |
|
34 |
|
|
|
|
|
35 |
|
36 |
|
37 |
yourquestion = st.text_input('Your topic', 'netzero')
|
@@ -39,6 +41,8 @@ st.write('Your input is ', yourquestion)
|
|
39 |
|
40 |
|
41 |
|
|
|
|
|
42 |
if st.button("Ask Questions "):
|
43 |
template = """
|
44 |
You are an AI assistant.
|
@@ -48,7 +52,7 @@ if st.button("Ask Questions "):
|
|
48 |
response = openai.ChatCompletion.create(
|
49 |
engine="gpt-35-turbo",
|
50 |
messages = [{"role":"system","content":"You are an AI assistant that helps people find information."},{"role":"user","content":yourquestion}],
|
51 |
-
temperature=
|
52 |
max_tokens=800,
|
53 |
top_p=1,
|
54 |
frequency_penalty=0,
|
|
|
32 |
st.title("Wipro demo with azure cognitive ")
|
33 |
|
34 |
|
35 |
+
atemprature = st.slider('Fact vs Creative?', 0, 10, 1)
|
36 |
+
atemprature = atemprature / 10.0
|
37 |
|
38 |
|
39 |
yourquestion = st.text_input('Your topic', 'netzero')
|
|
|
41 |
|
42 |
|
43 |
|
44 |
+
|
45 |
+
|
46 |
if st.button("Ask Questions "):
|
47 |
template = """
|
48 |
You are an AI assistant.
|
|
|
52 |
response = openai.ChatCompletion.create(
|
53 |
engine="gpt-35-turbo",
|
54 |
messages = [{"role":"system","content":"You are an AI assistant that helps people find information."},{"role":"user","content":yourquestion}],
|
55 |
+
temperature=atemprature,
|
56 |
max_tokens=800,
|
57 |
top_p=1,
|
58 |
frequency_penalty=0,
|