Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
85a0b8a
1
Parent(s):
d603edf
Update app.py
Browse files
app.py
CHANGED
@@ -33,10 +33,15 @@ def generate(
|
|
33 |
repetition_penalty: float = 1.,
|
34 |
do_sample: bool = False,
|
35 |
) -> Iterator[str]:
|
36 |
-
# Get Dutch date formatting
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
now = datetime.now()
|
39 |
now_str = now.strftime("%B %d, %Y, %H:%M:%S")
|
|
|
40 |
# Reset locale
|
41 |
try:
|
42 |
locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())
|
|
|
33 |
repetition_penalty: float = 1.,
|
34 |
do_sample: bool = False,
|
35 |
) -> Iterator[str]:
|
36 |
+
# Get Dutch date formatting locale
|
37 |
+
try:
|
38 |
+
locale.setlocale(locale.LC_ALL, "nl-NL")
|
39 |
+
except locale.Error:
|
40 |
+
pass
|
41 |
+
|
42 |
now = datetime.now()
|
43 |
now_str = now.strftime("%B %d, %Y, %H:%M:%S")
|
44 |
+
|
45 |
# Reset locale
|
46 |
try:
|
47 |
locale.setlocale(locale.LC_ALL, locale.getdefaultlocale())
|