Spaces:
Sleeping
Sleeping
Update random_charactor_generator.py
Browse files- random_charactor_generator.py +17 -11
random_charactor_generator.py
CHANGED
@@ -37,16 +37,22 @@ class RandomCharatorGeneratorTool(Tool):
|
|
37 |
def __call__(self, input:str="", *args, **kwargs):
|
38 |
|
39 |
text = '''
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
'''
|
52 |
return text
|
|
|
37 |
def __call__(self, input:str="", *args, **kwargs):
|
38 |
|
39 |
text = '''
|
40 |
+
Current time
|
41 |
+
<span id="time"></span>
|
42 |
+
</div>
|
43 |
+
<script>
|
44 |
+
function updateTime() {
|
45 |
+
var now = new Date();
|
46 |
+
var hours = now.getHours();
|
47 |
+
var minutes = now.getMinutes();
|
48 |
+
var seconds = now.getSeconds();
|
49 |
+
|
50 |
+
document.getElementById('time').textContent = hours + ':' + minutes + ':' + seconds;
|
51 |
+
}
|
52 |
+
|
53 |
+
window.addEventListener('load', function() {
|
54 |
+
setInterval(updateTime, 1000); // Update every second
|
55 |
+
});
|
56 |
+
</script>
|
57 |
'''
|
58 |
return text
|