First
Browse files
models/comic_image_generator.py
CHANGED
|
@@ -32,13 +32,6 @@ def log_execution(func):
|
|
| 32 |
end_str = datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S')
|
| 33 |
duration = end_time - start_time
|
| 34 |
|
| 35 |
-
# Write to file (works in Colab)
|
| 36 |
-
with open('content/logs.txt', 'w') as f:
|
| 37 |
-
f.write(f"{func.__name__}, start: {start_str}, end: {end_str}, duration: {duration:.4f}s\n")
|
| 38 |
-
|
| 39 |
-
# Also print to see output immediately
|
| 40 |
-
print(f"{func.__name__}, start: {start_str}, end: {end_str}, duration: {duration:.4f}s")
|
| 41 |
-
|
| 42 |
return result
|
| 43 |
return wrapper
|
| 44 |
|
|
|
|
| 32 |
end_str = datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S')
|
| 33 |
duration = end_time - start_time
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
return result
|
| 36 |
return wrapper
|
| 37 |
|
models/image_generation.py
CHANGED
|
@@ -24,13 +24,7 @@ def log_execution(func):
|
|
| 24 |
end_time = time.time()
|
| 25 |
end_str = datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S')
|
| 26 |
duration = end_time - start_time
|
| 27 |
-
|
| 28 |
-
# Write to file (works in Colab)
|
| 29 |
-
with open('content/logs.txt', 'w') as f:
|
| 30 |
-
f.write(f"{func.__name__}, start: {start_str}, end: {end_str}, duration: {duration:.4f}s\n")
|
| 31 |
-
|
| 32 |
-
# Also print to see output immediately
|
| 33 |
-
print(f"{func.__name__}, start: {start_str}, end: {end_str}, duration: {duration:.4f}s")
|
| 34 |
|
| 35 |
return result
|
| 36 |
return wrapper
|
|
|
|
| 24 |
end_time = time.time()
|
| 25 |
end_str = datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S')
|
| 26 |
duration = end_time - start_time
|
| 27 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
return result
|
| 30 |
return wrapper
|
models/story_generator.py
CHANGED
|
@@ -19,13 +19,7 @@ def log_execution(func):
|
|
| 19 |
end_time = time.time()
|
| 20 |
end_str = datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S')
|
| 21 |
duration = end_time - start_time
|
| 22 |
-
|
| 23 |
-
# Write to file (works in Colab)
|
| 24 |
-
with open('content/logs.txt', 'w') as f:
|
| 25 |
-
f.write(f"{func.__name__}, start: {start_str}, end: {end_str}, duration: {duration:.4f}s\n")
|
| 26 |
-
|
| 27 |
-
# Also print to see output immediately
|
| 28 |
-
print(f"{func.__name__}, start: {start_str}, end: {end_str}, duration: {duration:.4f}s")
|
| 29 |
|
| 30 |
return result
|
| 31 |
return wrapper
|
|
|
|
| 19 |
end_time = time.time()
|
| 20 |
end_str = datetime.fromtimestamp(end_time).strftime('%Y-%m-%d %H:%M:%S')
|
| 21 |
duration = end_time - start_time
|
| 22 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
return result
|
| 25 |
return wrapper
|