Spaces:
Sleeping
Sleeping
vtrv.vls
commited on
Commit
·
7f3196a
1
Parent(s):
cce3c9c
New API
Browse files
app.py
CHANGED
@@ -14,15 +14,17 @@ TINY_LLAMA = None
|
|
14 |
|
15 |
S3_SESSION = None
|
16 |
|
17 |
-
def giga_gen(content,
|
18 |
res = generate(content,'auth_token.json')
|
|
|
19 |
send_to_s3(res, f'protobench/giga_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
|
20 |
-
return res
|
21 |
|
22 |
-
def tiny_gen(content,
|
23 |
res = response_tiny_llama(TINY_LLAMA, content)
|
|
|
24 |
send_to_s3(res, f'protobench/tiny_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
|
25 |
-
return res
|
26 |
|
27 |
|
28 |
def tab_arena():
|
|
|
14 |
|
15 |
S3_SESSION = None
|
16 |
|
17 |
+
def giga_gen(content, chat_history):
|
18 |
res = generate(content,'auth_token.json')
|
19 |
+
chat_history.append((content, res))
|
20 |
send_to_s3(res, f'protobench/giga_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
|
21 |
+
return res, chat_history
|
22 |
|
23 |
+
def tiny_gen(content, chat_history):
|
24 |
res = response_tiny_llama(TINY_LLAMA, content)
|
25 |
+
chat_history.append((content, res))
|
26 |
send_to_s3(res, f'protobench/tiny_{str(datetime.now()).replace(" ", "_")}.json', S3_SESSION)
|
27 |
+
return res, chat_history
|
28 |
|
29 |
|
30 |
def tab_arena():
|