Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ def warmer():
|
|
20 |
end_time = time.time()
|
21 |
duration = end_time - start_time
|
22 |
print("Time elapsed for Pygmalion model : ", duration)
|
23 |
-
|
24 |
-
|
25 |
|
26 |
start_time = time.time()
|
27 |
text_output_2,image_output_2 = client.predict(
|
|
|
20 |
end_time = time.time()
|
21 |
duration = end_time - start_time
|
22 |
print("Time elapsed for Pygmalion model : ", duration)
|
23 |
+
if duration > 120: # Check if duration to generate tokens exceeds 2 minutes
|
24 |
+
restart()
|
25 |
|
26 |
start_time = time.time()
|
27 |
text_output_2,image_output_2 = client.predict(
|