Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -169,9 +169,10 @@ def function(Textbox, Textbox2, Textbox3):
|
|
169 |
# chat = openai.ChatCompletion.create(
|
170 |
# model="gpt-3.5-turbo", messages=messages
|
171 |
# )
|
172 |
-
|
|
|
173 |
reply = post.content.decode("utf-8")
|
174 |
-
|
175 |
image_array = download_image(f"https://api.placid.app/u/pydav4ibo?quote[text]={reply}")
|
176 |
print(post.content)
|
177 |
messages.append({"role": "assistant", "content": reply})
|
|
|
169 |
# chat = openai.ChatCompletion.create(
|
170 |
# model="gpt-3.5-turbo", messages=messages
|
171 |
# )
|
172 |
+
messages.append({"role": "user", "content": Textbox})
|
173 |
+
post = requests.post(target2, json=messages)
|
174 |
reply = post.content.decode("utf-8")
|
175 |
+
reply = reply.replace(" ", "%20")
|
176 |
image_array = download_image(f"https://api.placid.app/u/pydav4ibo?quote[text]={reply}")
|
177 |
print(post.content)
|
178 |
messages.append({"role": "assistant", "content": reply})
|