Spaces:
Runtime error
Runtime error
Commit
β’
db82445
1
Parent(s):
206a7be
make cache time global variable
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import os
|
|
11 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
12 |
is_macos = platform.system() == "Darwin"
|
13 |
LIMIT = None
|
14 |
-
CACHE_TIME = 60 * 5
|
15 |
|
16 |
@cached(cache=TTLCache(maxsize=100, ttl=CACHE_TIME))
|
17 |
def get_models():
|
|
|
11 |
os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
|
12 |
is_macos = platform.system() == "Darwin"
|
13 |
LIMIT = None
|
14 |
+
CACHE_TIME = 60 * 5 # 5 minutes
|
15 |
|
16 |
@cached(cache=TTLCache(maxsize=100, ttl=CACHE_TIME))
|
17 |
def get_models():
|