Spaces:
Runtime error
Runtime error
Factor Studios commited on
Update vision_analyzer.py
Browse files- vision_analyzer.py +11 -0
vision_analyzer.py
CHANGED
|
@@ -46,6 +46,17 @@ from transformers import AutoProcessor, AutoModelForCausalLM
|
|
| 46 |
|
| 47 |
# setup_unrar()
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
# Initialize rarfile with correct paths
|
|
|
|
| 46 |
|
| 47 |
# setup_unrar()
|
| 48 |
|
| 49 |
+
def log_message(message: str):
|
| 50 |
+
"""Log messages with timestamp"""
|
| 51 |
+
timestamp = time.strftime("%Y-%m-%d %H:%M:%S")
|
| 52 |
+
log_entry = f"[{timestamp}] {message}"
|
| 53 |
+
print(log_entry)
|
| 54 |
+
if 'processing_status' in globals():
|
| 55 |
+
processing_status["logs"].append(log_entry)
|
| 56 |
+
processing_status["last_update"] = timestamp
|
| 57 |
+
if len(processing_status["logs"]) > 100:
|
| 58 |
+
processing_status["logs"] = processing_status["logs"][-100:]
|
| 59 |
+
|
| 60 |
|
| 61 |
|
| 62 |
# Initialize rarfile with correct paths
|