Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -211,16 +211,17 @@ def log_conversation(timestamp, user_message, assistant_response, model_name, co
|
|
211 |
temp_file_path = temp_file.name
|
212 |
|
213 |
# Push to the dataset repository
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
214 |
api.create_commit(
|
215 |
repo_id="Mr-Geo/bas_chat_logs",
|
216 |
repo_type="dataset",
|
217 |
-
operations=
|
218 |
-
CommitOperationAdd(
|
219 |
-
path_in_repo=filename,
|
220 |
-
path_or_fileobj=temp_file_path,
|
221 |
-
commit_message=f"Update conversation logs for {current_date}"
|
222 |
-
)
|
223 |
-
],
|
224 |
commit_message=f"Update conversation logs for {current_date}"
|
225 |
)
|
226 |
|
@@ -399,7 +400,7 @@ if __name__ == "__main__":
|
|
399 |
scale=20
|
400 |
)
|
401 |
send = gr.Button("Send ⬆️", scale=1, min_width=50)
|
402 |
-
clear = gr.Button("Clear chat history 🧹")
|
403 |
|
404 |
gr.Examples(
|
405 |
examples=[
|
|
|
211 |
temp_file_path = temp_file.name
|
212 |
|
213 |
# Push to the dataset repository
|
214 |
+
operations = [
|
215 |
+
CommitOperationAdd(
|
216 |
+
path_in_repo=filename,
|
217 |
+
path_or_fileobj=temp_file_path
|
218 |
+
)
|
219 |
+
]
|
220 |
+
|
221 |
api.create_commit(
|
222 |
repo_id="Mr-Geo/bas_chat_logs",
|
223 |
repo_type="dataset",
|
224 |
+
operations=operations,
|
|
|
|
|
|
|
|
|
|
|
|
|
225 |
commit_message=f"Update conversation logs for {current_date}"
|
226 |
)
|
227 |
|
|
|
400 |
scale=20
|
401 |
)
|
402 |
send = gr.Button("Send ⬆️", scale=1, min_width=50)
|
403 |
+
clear = gr.Button("Clear chat history 🧹 (Click here if any errors are returned)")
|
404 |
|
405 |
gr.Examples(
|
406 |
examples=[
|