Spaces:
Runtime error
Runtime error
Commit
·
8498745
1
Parent(s):
1e76e9b
Update app.py
Browse files
app.py
CHANGED
|
@@ -55,7 +55,19 @@ def double_res(input_image):
|
|
| 55 |
to_predict.append(lower_left_slice)
|
| 56 |
|
| 57 |
# predicting all images at once
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
counter = 0
|
| 60 |
for i in range(height):
|
| 61 |
for j in range(width):
|
|
|
|
| 55 |
to_predict.append(lower_left_slice)
|
| 56 |
|
| 57 |
# predicting all images at once
|
| 58 |
+
completed = False
|
| 59 |
+
n = 16
|
| 60 |
+
while not completed:
|
| 61 |
+
try:
|
| 62 |
+
print("attempting with "+ str(n))
|
| 63 |
+
predicted = model.predict(np.array(to_predict),batch_size = n)
|
| 64 |
+
completed = True
|
| 65 |
+
print("completed with "+ str(n))
|
| 66 |
+
except:
|
| 67 |
+
print("attempt with " + str(n) + " failed")
|
| 68 |
+
n += -1
|
| 69 |
+
if n <= 0:
|
| 70 |
+
n = 1
|
| 71 |
counter = 0
|
| 72 |
for i in range(height):
|
| 73 |
for j in range(width):
|