Spaces:
Sleeping
Sleeping
Commit
·
4f7d83b
1
Parent(s):
4d0b859
cleaned some leftovers from previous tests
Browse files
app.py
CHANGED
|
@@ -5,8 +5,6 @@ import traceback
|
|
| 5 |
|
| 6 |
# Maximum number of model textboxes
|
| 7 |
MAX_MODELS = 10
|
| 8 |
-
# Cache for loaded models to reuse
|
| 9 |
-
LOADED_MODELS = {}
|
| 10 |
|
| 11 |
GPT_CONFIG_MODELS = [
|
| 12 |
"openai-community/gpt2-large",
|
|
@@ -33,10 +31,6 @@ def remove_textboxes(n_visible):
|
|
| 33 |
old = n_visible
|
| 34 |
if n_visible > 2:
|
| 35 |
n_visible -= 1
|
| 36 |
-
new = n_visible
|
| 37 |
-
# Remove cached models for slots now hidden
|
| 38 |
-
for idx in range(new, old):
|
| 39 |
-
LOADED_MODELS.pop(idx+1, None)
|
| 40 |
tb_updates = []
|
| 41 |
for i in range(MAX_MODELS):
|
| 42 |
if i < n_visible:
|
|
|
|
| 5 |
|
| 6 |
# Maximum number of model textboxes
|
| 7 |
MAX_MODELS = 10
|
|
|
|
|
|
|
| 8 |
|
| 9 |
GPT_CONFIG_MODELS = [
|
| 10 |
"openai-community/gpt2-large",
|
|
|
|
| 31 |
old = n_visible
|
| 32 |
if n_visible > 2:
|
| 33 |
n_visible -= 1
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
tb_updates = []
|
| 35 |
for i in range(MAX_MODELS):
|
| 36 |
if i < n_visible:
|