Paul-Louis Pröve
commited on
Commit
·
0f79efa
1
Parent(s):
08ffe8d
print for storage state
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
import json
|
|
|
|
| 4 |
import openai
|
| 5 |
import gradio as gr
|
| 6 |
|
|
@@ -71,6 +72,7 @@ def bot(history, results):
|
|
| 71 |
yield history
|
| 72 |
with open("/data/" + str(time.time()).split(".")[0] + ".txt", "w") as f:
|
| 73 |
json.dump(history, f)
|
|
|
|
| 74 |
|
| 75 |
|
| 76 |
with gr.Blocks(
|
|
|
|
| 1 |
import os
|
| 2 |
import time
|
| 3 |
import json
|
| 4 |
+
import glob
|
| 5 |
import openai
|
| 6 |
import gradio as gr
|
| 7 |
|
|
|
|
| 72 |
yield history
|
| 73 |
with open("/data/" + str(time.time()).split(".")[0] + ".txt", "w") as f:
|
| 74 |
json.dump(history, f)
|
| 75 |
+
print("Number of chats saved: ", len(glob("/data/*.txt")))
|
| 76 |
|
| 77 |
|
| 78 |
with gr.Blocks(
|