Spaces:
Running
Running
Update utils/functions.py
Browse files- utils/functions.py +9 -0
utils/functions.py
CHANGED
@@ -92,6 +92,15 @@ def get_history():
|
|
92 |
logging.info("Historia analiz zosta艂a pobrana pomy艣lnie.")
|
93 |
return history
|
94 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
def update_stats(fraud_detected=False):
|
96 |
"""Aktualizuje statystyki analiz w pliku stats.json."""
|
97 |
stats = load_json(STATS_FILE)
|
|
|
92 |
logging.info("Historia analiz zosta艂a pobrana pomy艣lnie.")
|
93 |
return history
|
94 |
|
95 |
+
def get_analysis_history():
|
96 |
+
"""Zwraca szczeg贸艂ow膮 histori臋 analiz z pliku history.json."""
|
97 |
+
history = load_json(HISTORY_FILE)
|
98 |
+
if history:
|
99 |
+
return history
|
100 |
+
else:
|
101 |
+
logging.info("Brak zapisanej historii analiz.")
|
102 |
+
return []
|
103 |
+
|
104 |
def update_stats(fraud_detected=False):
|
105 |
"""Aktualizuje statystyki analiz w pliku stats.json."""
|
106 |
stats = load_json(STATS_FILE)
|