Spaces:
Sleeping
Sleeping
Commit
·
0ceab50
1
Parent(s):
978cac7
tokens
Browse files
app.py
CHANGED
@@ -72,7 +72,7 @@ def generate_story(subject: str, setting: str) -> str:
|
|
72 |
"and you will write the entire story. It should be targetted at children 5 and younger and take about "
|
73 |
"a minute to read")},
|
74 |
{"role": "user", "content": f"Please tell me a story about a {subject} in {setting}"}]
|
75 |
-
response = client.chat_completion(messages, max_tokens=
|
76 |
gr.Info("Story Generated", duration=3)
|
77 |
story = response.choices[0].message.content
|
78 |
return None, None, story
|
|
|
72 |
"and you will write the entire story. It should be targetted at children 5 and younger and take about "
|
73 |
"a minute to read")},
|
74 |
{"role": "user", "content": f"Please tell me a story about a {subject} in {setting}"}]
|
75 |
+
response = client.chat_completion(messages, max_tokens=1024, seed=random.randint(1, 5000))
|
76 |
gr.Info("Story Generated", duration=3)
|
77 |
story = response.choices[0].message.content
|
78 |
return None, None, story
|