Spaces:
Runtime error
Runtime error
freemt
commited on
Commit
·
4ba22a4
1
Parent(s):
5cb1a08
Update (dev) time.tzset()
Browse files
app.py
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
"""Create entry."""
|
| 2 |
# pylint: disbale=invalid-name
|
|
|
|
|
|
|
| 3 |
from pathlib import Path
|
| 4 |
|
| 5 |
import gradio as gr
|
|
@@ -14,6 +16,12 @@ from radio_mlbee import __version__
|
|
| 14 |
from radio_mlbee.gen_cmat import gen_cmat
|
| 15 |
from radio_mlbee.utils import text1, text2
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
def greet(name):
|
| 19 |
"""Greet."""
|
|
|
|
| 1 |
"""Create entry."""
|
| 2 |
# pylint: disbale=invalid-name
|
| 3 |
+
import os
|
| 4 |
+
import time
|
| 5 |
from pathlib import Path
|
| 6 |
|
| 7 |
import gradio as gr
|
|
|
|
| 16 |
from radio_mlbee.gen_cmat import gen_cmat
|
| 17 |
from radio_mlbee.utils import text1, text2
|
| 18 |
|
| 19 |
+
os.environ["TZ"] = "Asia/Shanghai"
|
| 20 |
+
try:
|
| 21 |
+
time.tzset() # type: ignore
|
| 22 |
+
except Exception as _:
|
| 23 |
+
logger.warning("time.tzset() error: %s. Probably running Windows, we let it pass.", _)
|
| 24 |
+
|
| 25 |
|
| 26 |
def greet(name):
|
| 27 |
"""Greet."""
|