From e3a09e406de9f6ef622c71f8523becbf47e2ad45 Mon Sep 17 00:00:00 2001 From: Simon Moisy Date: Tue, 25 Mar 2025 08:16:13 +0800 Subject: [PATCH] new chartview class, updated db locations --- bitcoin_trend_analysis.py | 2 +- main_article_analyzer.py | 2 +- main_trend_analysis.py | 2 +- old/new_data_prediction.py | 2 +- utils/drop_data.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bitcoin_trend_analysis.py b/bitcoin_trend_analysis.py index 799b2a1..98e2dbc 100644 --- a/bitcoin_trend_analysis.py +++ b/bitcoin_trend_analysis.py @@ -86,7 +86,7 @@ class BitcoinTrendAnalysis: ax.legend() ax.grid(True) - engine = create_engine('sqlite:///bitcoin_trends.db') + engine = create_engine('sqlite:///databases/bitcoin_trends.db') Base.metadata.create_all(engine) Session = sessionmaker(bind=engine) diff --git a/main_article_analyzer.py b/main_article_analyzer.py index 3efb066..390ba4c 100644 --- a/main_article_analyzer.py +++ b/main_article_analyzer.py @@ -35,7 +35,7 @@ if __name__ == "__main__": analyzer = ArticleAnalyzer() - engine = create_engine('sqlite:///article_analysis.db') + engine = create_engine('sqlite:///databases/article_analysis.db') Session = sessionmaker(bind=engine) session = Session() diff --git a/main_trend_analysis.py b/main_trend_analysis.py index 18436e8..8a6182a 100644 --- a/main_trend_analysis.py +++ b/main_trend_analysis.py @@ -1,6 +1,6 @@ from bitcoin_trend_analysis import BitcoinTrendAnalysis if __name__ == "__main__": - ma = BitcoinTrendAnalysis(db_path='bitcoin_historical_data.db') + ma = BitcoinTrendAnalysis(db_path='databases/bitcoin_historical_data.db') ma.load_data() ma.analyze_trends_peaks(distance=1, prominence_factor=0.1) diff --git a/old/new_data_prediction.py b/old/new_data_prediction.py index fc24fb7..9c8866f 100644 --- a/old/new_data_prediction.py +++ b/old/new_data_prediction.py @@ -4,7 +4,7 @@ from sklearn.metrics import confusion_matrix if __name__ == "__main__": model = load_model('models/model_2025-01-21_04-49-43.h5') - predictor = BitcoinPricePredictor(model=model, db_path='bitcoin_historical_data.db') + predictor = BitcoinPricePredictor(model=model, db_path='databases/bitcoin_historical_data.db') missing_data = predictor.load_new_data_from_model() diff --git a/utils/drop_data.py b/utils/drop_data.py index fa447c7..688b509 100644 --- a/utils/drop_data.py +++ b/utils/drop_data.py @@ -2,7 +2,7 @@ import sqlite3 from datetime import datetime # Specify the database file path -db_path = 'bitcoin_historical_data.db' +db_path = 'databases/bitcoin_historical_data.db' # Create a connection to the database connection = sqlite3.connect(db_path)