Update app.py
Browse files
app.py
CHANGED
@@ -262,7 +262,28 @@ class ChatbotAPP:
|
|
262 |
with gr.Blocks(theme=gr.themes.Soft()) as app:
|
263 |
gr.Markdown("# ECU-IVADE: Chat With Barry")
|
264 |
unique_id_display = gr.Textbox(value=self.unique_id, label="Session Unique ID", interactive=False,show_copy_button = True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
265 |
|
|
|
|
|
266 |
|
267 |
with gr.Tab("Terms and Conditions"):
|
268 |
#name = gr.Textbox(label="Name")
|
|
|
262 |
with gr.Blocks(theme=gr.themes.Soft()) as app:
|
263 |
gr.Markdown("# ECU-IVADE: Chat With Barry")
|
264 |
unique_id_display = gr.Textbox(value=self.unique_id, label="Session Unique ID", interactive=False,show_copy_button = True)
|
265 |
+
clock_html = """
|
266 |
+
<div style='margin-top: 20px;'>
|
267 |
+
<strong>Current Time:</strong> <span id='clock'></span>
|
268 |
+
</div>
|
269 |
+
<script>
|
270 |
+
function updateClock() {
|
271 |
+
var now = new Date();
|
272 |
+
var hours = now.getHours();
|
273 |
+
var minutes = now.getMinutes();
|
274 |
+
var seconds = now.getSeconds();
|
275 |
+
minutes = minutes < 10 ? '0' + minutes : minutes;
|
276 |
+
seconds = seconds < 10 ? '0' + seconds : seconds;
|
277 |
+
var timeString = hours + ':' + minutes + ':' + seconds;
|
278 |
+
document.getElementById('clock').textContent = timeString;
|
279 |
+
}
|
280 |
+
setInterval(updateClock, 1000);
|
281 |
+
updateClock(); // initial call to display clock immediately
|
282 |
+
</script>
|
283 |
+
"""
|
284 |
|
285 |
+
# Add the HTML component with the clock to the app
|
286 |
+
gr.HTML(value=clock_html)
|
287 |
|
288 |
with gr.Tab("Terms and Conditions"):
|
289 |
#name = gr.Textbox(label="Name")
|