Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -116,7 +116,7 @@ def predict(message, history, system_prompt, temperature, max_new_tokens, top_k,
|
|
| 116 |
send_discord(instruction, "".join(outputs))
|
| 117 |
|
| 118 |
|
| 119 |
-
|
| 120 |
day=datetime.now().strftime("%Y-%m-%d")
|
| 121 |
timestamp=datetime.now().timestamp()
|
| 122 |
dd={
|
|
@@ -131,7 +131,7 @@ def predict(message, history, system_prompt, temperature, max_new_tokens, top_k,
|
|
| 131 |
'instruction':instruction,
|
| 132 |
'output':"".join(outputs)
|
| 133 |
}
|
| 134 |
-
|
| 135 |
path_or_fileobj=json.dumps(dd, indent=2, ensure_ascii=False).encode('utf-8'),
|
| 136 |
path_in_repo=f"{day}/{timestamp}.json",
|
| 137 |
repo_id="speakleash/bielik-logs",
|
|
|
|
| 116 |
send_discord(instruction, "".join(outputs))
|
| 117 |
|
| 118 |
|
| 119 |
+
hfapi = HfApi()
|
| 120 |
day=datetime.now().strftime("%Y-%m-%d")
|
| 121 |
timestamp=datetime.now().timestamp()
|
| 122 |
dd={
|
|
|
|
| 131 |
'instruction':instruction,
|
| 132 |
'output':"".join(outputs)
|
| 133 |
}
|
| 134 |
+
hfapi.upload_file(
|
| 135 |
path_or_fileobj=json.dumps(dd, indent=2, ensure_ascii=False).encode('utf-8'),
|
| 136 |
path_in_repo=f"{day}/{timestamp}.json",
|
| 137 |
repo_id="speakleash/bielik-logs",
|