Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,6 +25,8 @@ with st.form("my_form"):
|
|
25 |
|
26 |
# Initialize the full_text variable
|
27 |
full_text = " "
|
|
|
|
|
28 |
|
29 |
if submitted:
|
30 |
messages = [
|
@@ -37,10 +39,9 @@ if submitted:
|
|
37 |
messages=messages,
|
38 |
temperature=0.5,
|
39 |
max_tokens=300,
|
40 |
-
top_p=0.
|
41 |
stream=True
|
42 |
-
)
|
43 |
-
|
44 |
# Concatenate chunks to form the full response
|
45 |
for chunk in stream:
|
46 |
full_text += chunk.choices[0].delta.content
|
|
|
25 |
|
26 |
# Initialize the full_text variable
|
27 |
full_text = " "
|
28 |
+
# to get different jokes
|
29 |
+
top_p_init = 0.7
|
30 |
|
31 |
if submitted:
|
32 |
messages = [
|
|
|
39 |
messages=messages,
|
40 |
temperature=0.5,
|
41 |
max_tokens=300,
|
42 |
+
top_p=(top_p_init+0.21),
|
43 |
stream=True
|
44 |
+
)+0.21
|
|
|
45 |
# Concatenate chunks to form the full response
|
46 |
for chunk in stream:
|
47 |
full_text += chunk.choices[0].delta.content
|