please resolve the issues with the code:
#  gui.py

import sys
from PyQt5.QtWidgets import (
    QApplication, QWidget, QVBoxLayout, QLabel, QPushButton,
    QFileDialog, QLineEdit, QMessageBox, QTextEdit, QHBoxLayout,
    QButtonGroup
)
from PyQt5.QtCore import Qt, QThread, pyqtSignal, QTimer
from PyQt5.QtGui import QFont, QPalette, QColor
from main import multi_stock_prediction
from config import START_DATE, END_DATE, INTERVAL
from utils import setup_logging, log_message
import os
import pandas as pd  # Added for saving predictions

class WorkerThread(QThread):
    # Define custom signals
    progress = pyqtSignal(str)
    finished = pyqtSignal(dict)
    
    def __init__(self, stock_symbols, start_date, end_date, interval, train_mode):
        super().__init__()
        self.stock_symbols = stock_symbols
        self.start_date = start_date
        self.end_date = end_date
        self.interval = interval
        self.train_mode = train_mode
        self.predictions = {}
    
    def run(self):
        log_message("WorkerThread started.")
        self.predictions = multi_stock_prediction(
            self.stock_symbols, 
            self.start_date, 
            self.end_date, 
            self.interval, 
            self.train_mode,
            progress_callback=self.emit_progress
        )
        self.finished.emit(self.predictions)
        log_message("WorkerThread finished.")
    
    def emit_progress(self, message: str):
        self.progress.emit(message)

class StockPredictionApp(QWidget):
    def __init__(self):
        super().__init__()
        self.setWindowTitle("Stock Prediction Application")
        self.setGeometry(100, 100, 800, 600)
        self.init_ui()
        self.worker = None
    
    def init_ui(self):
        self.layout = QVBoxLayout()
        
        self.step_labels = []
        # Step 1: Mode Selection
        self.create_mode_selection()
        
        # Step 2: Stock Input
        self.create_stock_input()
        
        # Step 3: Display Models
        self.create_model_display()
        
        # Start Button
        self.create_start_button()
        
        # Progress Display
        self.create_progress_display()
        
        # Prediction Output
        self.create_output_display()
        
        # Set Layout
        self.setLayout(self.layout)
        
        # Initialize blinking steps
        self.current_step = 0
        self.start_blinking()
    
    def create_mode_selection(self):
        mode_layout = QHBoxLayout()
        mode_label = QLabel("Select Mode:")
        mode_label.setFont(QFont('Arial', 12))
        
        # Mode Buttons
        self.mode_group = QButtonGroup(self)
        self.train_button = QPushButton("TRAIN")
        self.use_button = QPushButton("USE")
        
        for btn in [self.train_button, self.use_button]:
            btn.setCheckable(True)
            btn.setFixedWidth(100)
            btn.setStyleSheet("""
                QPushButton {
                    background-color: lightgray;
                    border-radius: 10px;
                    font-size: 14px;
                }
                QPushButton:checked {
                    background-color: skyblue;
                }
            """)
        
        self.mode_group.addButton(self.train_button)
        self.mode_group.addButton(self.use_button)

        self.mode_group.buttonClicked.connect(self.on_mode_selected)

        mode_layout.addWidget(mode_label)
        mode_layout.addWidget(self.train_button)
        mode_layout.addWidget(self.use_button)
        self.layout.addLayout(mode_layout)
        
        # Blinking message for mode selection
        self.mode_blink_label = QLabel("Please select a mode to proceed.")
        self.mode_blink_label.setFont(QFont('Arial', 14)) # 10
        self.layout.addWidget(self.mode_blink_label)
        self.step_labels.append(self.mode_blink_label)

    def create_stock_input(self):
        stock_layout = QHBoxLayout()
        stock_label = QLabel("Stock Symbols (comma-separated):")
        stock_label.setFont(QFont('Arial', 14)) #10
        self.stock_input = QLineEdit()
        self.stock_input.setDisabled(True)
        stock_layout.addWidget(stock_label)
        stock_layout.addWidget(self.stock_input)
        self.layout.addLayout(stock_layout)
        
        # Or Load from File
        file_layout = QHBoxLayout()
        self.load_button = QPushButton("Load Stocks from File")
        self.load_button.setDisabled(True)
        self.load_button.clicked.connect(self.load_stocks_from_file)
        file_layout.addWidget(self.load_button)
        self.layout.addLayout(file_layout)
        
        # Blinking message for stock input
        self.stock_blink_label = QLabel("Enter stock symbols or load from a file.")
        self.stock_blink_label.setFont(QFont('Arial', 14)) #10
        self.layout.addWidget(self.stock_blink_label)
        self.step_labels.append(self.stock_blink_label)
        
    def create_model_display(self):
        # Model Selection (Display)
        model_layout = QVBoxLayout()
        model_label = QLabel("Available Models and Parameters:")
        model_label.setFont(QFont('Arial', 14))
        self.model_text = QTextEdit()
        self.model_text.setReadOnly(True)
        self.display_models()
        model_layout.addWidget(model_label)
        model_layout.addWidget(self.model_text)
        self.layout.addLayout(model_layout)
    
    def create_start_button(self):
        self.start_button = QPushButton("START")
        self.start_button.setDisabled(True)
        self.start_button.clicked.connect(self.start_process)
        self.start_button.setFixedSize(200, 50)
        self.start_button.setFont(QFont('Arial', 16, QFont.Bold))
        self.start_button.setStyleSheet("""
            QPushButton {
                background-color: green;
                color: white;
                border-radius: 25px;
            }
            QPushButton:hover {
                background-color: #006400;
            }
            QPushButton:disabled {
                background-color: gray;
            }
        """)
        self.layout.addWidget(self.start_button, alignment=Qt.AlignCenter)
    
    def create_progress_display(self):
        progress_label = QLabel("Progress:")
        progress_label.setFont(QFont('Arial', 14))
        self.progress_text = QTextEdit()
        self.progress_text.setReadOnly(True)
        self.layout.addWidget(progress_label)
        self.layout.addWidget(self.progress_text)
    
    def create_output_display(self):
        output_label = QLabel("Final Predictions:")
        output_label.setFont(QFont('Arial', 14))
        self.output_text = QTextEdit()
        self.output_text.setReadOnly(True)
        self.layout.addWidget(output_label)
        self.layout.addWidget(self.output_text)
    
    def start_blinking(self):
        # Set up a timer for blinking effect
        self.blink_timer = QTimer()
        self.blink_timer.timeout.connect(self.blink_label)
        self.blink_state = False
        self.blink_timer.start(500)  # Blink every 500 ms
    
    def blink_label(self):
        # Blink only the current step label
        for i, label in enumerate(self.step_labels):
            if i == self.current_step:
                palette = label.palette()
                if self.blink_state:
                    palette.setColor(QPalette.WindowText, Qt.red)
                else:
                    palette.setColor(QPalette.WindowText, Qt.black)
                label.setPalette(palette)
            else:
                # Ensure other labels are in default state
                palette = label.palette()
                palette.setColor(QPalette.WindowText, Qt.black)
                label.setPalette(palette)
        self.blink_state = not self.blink_state
    
    def on_mode_selected(self):
        # When a mode is selected, enable the stock input
        self.stock_input.setDisabled(False)
        self.load_button.setDisabled(False)
        self.current_step = 1  # Move to next step
    
    def display_models(self):
        models_info = """
Available Models:

1. LSTM
   - Layers: 2 LSTM layers (50 units each), 2 Dense layers
   - Optimizer: Adam
   - Loss: Mean Squared Error
   - Epochs: 100
   - Batch Size: 64

2. XGBoost
   - n_estimators: 100
   - learning_rate: 0.1
   - max_depth: 5

3. Random Forest
   - n_estimators: 100
   - max_depth: None
   - min_samples_split: 2

4. Linear Regression
   - No hyperparameters
"""
        self.model_text.setText(models_info)
    
    def load_stocks_from_file(self):
        options = QFileDialog.Options()
        filename, _ = QFileDialog.getOpenFileName(
            self, "Select Stock List File", "", 
            "Text Files (*.txt);;CSV Files (*.csv);;All Files (*)", 
            options=options
        )
        if filename:
            try:
                ext = os.path.splitext(filename)[1]
                if ext.lower() == '.txt':
                    with open(filename, 'r') as file:
                        stocks = file.read().splitlines()
                else:
                    df = pd.read_csv(filename)
                    stocks = df.iloc[:, 0].tolist()
                self.stock_input.setText(','.join(stocks))
                log_message(f"Loaded stocks from file: {filename}")
                self.current_step = 2  # Move to next step
                self.start_button.setDisabled(False)
            except Exception as e:
                QMessageBox.critical(self, "Error", f"Failed to load file: {e}")
    
    def start_process(self):
        stock_text = self.stock_input.text().strip()
        if not stock_text:
            QMessageBox.warning(self, "Input Error", "Please enter at least one stock symbol.")
            return
        stock_symbols = [s.strip() for s in stock_text.split(',') if s.strip()]
        if not stock_symbols:
            QMessageBox.warning(self, "Input Error", "Please enter valid stock symbols.")
            return

        # Determine mode
        mode = ""
        if self.train_button.isChecked():
            mode = 'train'
        elif self.use_button.isChecked():
            mode = 'use'
        else:
            QMessageBox.warning(self, "Input Error", "Please select a mode.")
            return

        # Disable UI elements during processing
        self.start_button.setDisabled(True)
        self.progress_text.clear()
        self.output_text.clear()
        self.stock_input.setDisabled(True)
        self.load_button.setDisabled(True)
        self.train_button.setDisabled(True)
        self.use_button.setDisabled(True)
        # Stop blinking
        self.blink_timer.stop()
        # Start Worker Thread
        self.worker = WorkerThread(stock_symbols, START_DATE, END_DATE, INTERVAL, mode)
        self.worker.progress.connect(self.update_progress)
        self.worker.finished.connect(self.process_finished)
        self.worker.start()
        log_message("Started processing in WorkerThread.")
    
    def update_progress(self, message: str):
        self.progress_text.append(message)
    
    def process_finished(self, predictions: dict):
        for stock, pred in predictions.items():
            self.output_text.append(f"{stock}: {pred}")
        # Save predictions to CSV
        if predictions:
            pred_df = pd.DataFrame(list(predictions.items()), columns=['Stock', 'Prediction'])
            pred_df.to_csv(os.path.join('models', 'predictions.csv'), index=False)
            log_message("Saved predictions to predictions.csv")
        # Re-enable UI elements
        self.start_button.setDisabled(False)
        self.stock_input.setDisabled(False)
        self.load_button.setDisabled(False)
        self.train_button.setDisabled(False)
        self.use_button.setDisabled(False)
        log_message("Processing completed.")

if __name__ == "__main__":
    # Initialize logging before launching the GUI
    from utils import setup_logging
    setup_logging()
    
    app = QApplication(sys.argv)
    window = StockPredictionApp()
    window.show()
    sys.exit(app.exec_())


1. The buttons 'Train' and 'Use' should be bigger and stylish.
2. When button is selected, the program goes to 'Enter Symbols ' but it does not proceed if we enter symbols manually. It proceed only when symbols are fed through load a symbol file option.only then it goes to start button.
3. Font size in Final Predictions is smaller. Make it bigger and arrange the data in columnar fashion ,  like 'Symbol', Present price, Predicted price, and change%, colored red if negative and green if positive. and last column should depict an arrow, upward arrow green and if downward arrow, red.