Spaces:
Runtime error
Runtime error
disable cache for process
Browse files- app/app.py +2 -2
app/app.py
CHANGED
@@ -19,13 +19,13 @@ def get_generator():
|
|
19 |
return text_generator
|
20 |
|
21 |
|
22 |
-
|
23 |
def process(text: str, max_length: int = 100, do_sample: bool = True, top_k: int = 50, top_p: float = 0.95,
|
24 |
temperature: float = 1.0, max_time: float = None):
|
25 |
st.write("Cache miss: process")
|
26 |
set_seed(42)
|
27 |
result = text_generator(text, max_length=max_length, do_sample=do_sample,
|
28 |
-
|
29 |
return result
|
30 |
|
31 |
|
|
|
19 |
return text_generator
|
20 |
|
21 |
|
22 |
+
#@st.cache(suppress_st_warning=True)
|
23 |
def process(text: str, max_length: int = 100, do_sample: bool = True, top_k: int = 50, top_p: float = 0.95,
|
24 |
temperature: float = 1.0, max_time: float = None):
|
25 |
st.write("Cache miss: process")
|
26 |
set_seed(42)
|
27 |
result = text_generator(text, max_length=max_length, do_sample=do_sample,
|
28 |
+
top_k=top_k, top_p=top_p, temperature=temperature, max_time=max_time)
|
29 |
return result
|
30 |
|
31 |
|