Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -21,23 +21,21 @@ def split_models(models,nb_models):
|
|
21 |
models_lis_temp.append(models_temp)
|
22 |
return models_lis_temp
|
23 |
|
24 |
-
def
|
25 |
models_temp=[]
|
26 |
models_lis_temp=[]
|
27 |
i=0
|
28 |
-
|
29 |
for m in models:
|
30 |
-
|
31 |
-
|
32 |
-
models_temp.append(m)
|
33 |
-
models_temp.append(m)
|
34 |
i=i+1
|
35 |
-
if i%
|
36 |
models_lis_temp.append(models_temp)
|
37 |
models_temp=[]
|
38 |
if len(models_temp)>1:
|
39 |
models_lis_temp.append(models_temp)
|
40 |
-
return models_lis_temp ,
|
41 |
|
42 |
def split_models_8x3(models,nb_models):
|
43 |
models_temp=[]
|
@@ -56,7 +54,7 @@ def split_models_8x3(models,nb_models):
|
|
56 |
|
57 |
"""models_test=split_models_x3(models,nb_models)"""
|
58 |
"""models_test=split_models(models,nb_models)"""
|
59 |
-
models_test , nb_models =
|
60 |
|
61 |
def get_current_time():
|
62 |
now = datetime.now()
|
|
|
21 |
models_lis_temp.append(models_temp)
|
22 |
return models_lis_temp
|
23 |
|
24 |
+
def split_models_axb(models,a,b):
|
25 |
models_temp=[]
|
26 |
models_lis_temp=[]
|
27 |
i=0
|
28 |
+
nb_models=b
|
29 |
for m in models:
|
30 |
+
for j in range(a):
|
31 |
+
models_temp.append(m)
|
|
|
|
|
32 |
i=i+1
|
33 |
+
if i%nb_models==0:
|
34 |
models_lis_temp.append(models_temp)
|
35 |
models_temp=[]
|
36 |
if len(models_temp)>1:
|
37 |
models_lis_temp.append(models_temp)
|
38 |
+
return models_lis_temp , a*b
|
39 |
|
40 |
def split_models_8x3(models,nb_models):
|
41 |
models_temp=[]
|
|
|
54 |
|
55 |
"""models_test=split_models_x3(models,nb_models)"""
|
56 |
"""models_test=split_models(models,nb_models)"""
|
57 |
+
models_test , nb_models =split_models_axb(models,2,20)
|
58 |
|
59 |
def get_current_time():
|
60 |
now = datetime.now()
|