Spaces:
Paused
Paused
Upload app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,13 @@ async def get_model_reply(prompt,style,cookies,context=[]):
|
|
23 |
cookies = json.loads(cookies)
|
24 |
# given the most recent context (4096 characters)
|
25 |
# continue the text up to 2048 tokens ~ 8192 charaters
|
26 |
-
bot = Chatbot(cookies=cookies)
|
27 |
|
28 |
try:
|
|
|
29 |
raw_data = await bot.ask(prompt, conversation_style=style)
|
30 |
await bot.close()
|
31 |
print(raw_data)
|
32 |
-
|
33 |
try:
|
34 |
response = raw_data["item"]["messages"][1]["text"]
|
35 |
except:
|
|
|
23 |
cookies = json.loads(cookies)
|
24 |
# given the most recent context (4096 characters)
|
25 |
# continue the text up to 2048 tokens ~ 8192 charaters
|
|
|
26 |
|
27 |
try:
|
28 |
+
bot = Chatbot(cookies=cookies)
|
29 |
raw_data = await bot.ask(prompt, conversation_style=style)
|
30 |
await bot.close()
|
31 |
print(raw_data)
|
32 |
+
|
33 |
try:
|
34 |
response = raw_data["item"]["messages"][1]["text"]
|
35 |
except:
|