Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
from datetime import datetime
|
3 |
-
import time
|
4 |
|
5 |
# Shared state to store messages
|
6 |
messages = []
|
@@ -10,7 +9,7 @@ def chat(message, history):
|
|
10 |
|
11 |
# Add the new message to the shared state
|
12 |
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
13 |
-
messages.append(f"
|
14 |
|
15 |
# Return the updated chat history
|
16 |
return "", messages
|
|
|
1 |
import gradio as gr
|
2 |
from datetime import datetime
|
|
|
3 |
|
4 |
# Shared state to store messages
|
5 |
messages = []
|
|
|
9 |
|
10 |
# Add the new message to the shared state
|
11 |
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
12 |
+
messages.append([f"User ({timestamp})", message])
|
13 |
|
14 |
# Return the updated chat history
|
15 |
return "", messages
|