Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,15 @@
|
|
1 |
import gradio as gr
|
2 |
import time
|
|
|
|
|
|
|
|
|
3 |
|
4 |
def greet(name):
|
5 |
-
|
6 |
-
|
|
|
|
|
7 |
|
8 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text", concurrency_limit=5)
|
9 |
demo.launch()
|
|
|
1 |
import gradio as gr
|
2 |
import time
|
3 |
+
from datetime import datetime
|
4 |
+
import pytz
|
5 |
+
import psutil
|
6 |
+
|
7 |
|
8 |
def greet(name):
|
9 |
+
start = datetime.now(pytz.timezone('Asia/Tokyo')).strftime("%Y-%m-%d %H:%M:%S")
|
10 |
+
time.sleep(3)
|
11 |
+
end = datetime.now(pytz.timezone('Asia/Tokyo')).strftime("%Y-%m-%d %H:%M:%S")
|
12 |
+
return f"[{name}] {start} ~ {end}"
|
13 |
|
14 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text", concurrency_limit=5)
|
15 |
demo.launch()
|