Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
7815cda
1
Parent(s):
bd30708
New API
Browse files
app.py
CHANGED
@@ -15,8 +15,11 @@ TINY_LLAMA = None
|
|
15 |
S3_SESSION = None
|
16 |
|
17 |
def giga_gen(content, chat_history):
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
20 |
send_to_s3(res, f'protobench/giga_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
|
21 |
print(chat_history)
|
22 |
return '', chat_history
|
|
|
15 |
S3_SESSION = None
|
16 |
|
17 |
def giga_gen(content, chat_history):
|
18 |
+
if chat_history is None:
|
19 |
+
chat_history = []
|
20 |
+
else:
|
21 |
+
chat_history.append({"role": "user", "content": content})
|
22 |
+
res = generate(chat_history,'auth_token.json')
|
23 |
send_to_s3(res, f'protobench/giga_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
|
24 |
print(chat_history)
|
25 |
return '', chat_history
|