consider the error s i got in app.log and terminal :
APP.LOG
2024-09-25 00:16:17,798 - INFO - Started processing in WorkerThread.
2024-09-25 00:16:17,799 - INFO - WorkerThread started.
2024-09-25 00:16:17,800 - INFO - Fetching data for HAL.NS
2024-09-25 00:16:18,436 - INFO - Preprocessing data...
2024-09-25 00:16:18,444 - INFO - Preprocessing completed.
2024-09-25 00:16:19,908 - INFO - Saved plot for HAL.NS at c:\Users\swarn\python_codes\python_try\stock_prediction\models\HAL.NS_prediction.png
2024-09-25 00:16:19,910 - INFO - WorkerThread finished.


terminal :

PS C:\Users\siddh> & C:/Users/siddh/AppData/Local/Programs/Python/Python311/python.exe c:/Users/swarn/python_codes/python_try/stock_prediction/gui.py
C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\yfinance\base.py:48: FutureWarning: The default dtype for empty Series will be 'object' instead of 'float64' in a future version. Specify a dtype explicitly to silence this warning.
  _empty_series = pd.Series()
2024-09-25 00:16:17,798 - INFO - Started processing in WorkerThread.
2024-09-25 00:16:17,799 - INFO - WorkerThread started.
2024-09-25 00:16:17,800 - INFO - Fetching data for HAL.NS
[*********************100%%**********************]  1 of 1 completed
2024-09-25 00:16:18,436 - INFO - Preprocessing data...
2024-09-25 00:16:18,444 - INFO - Preprocessing completed.
3/3 [==============================] - 1s 3ms/step
c:\Users\swarn\python_codes\python_try\stock_prediction\main.py:169: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail.
  plt.figure(figsize=(14, 7))
2024-09-25 00:16:19,908 - INFO - Saved plot for HAL.NS at c:\Users\swarn\python_codes\python_try\stock_prediction\models\HAL.NS_prediction.png
2024-09-25 00:16:19,910 - INFO - WorkerThread finished.
Traceback (most recent call last):
  File "c:\Users\swarn\python_codes\python_try\stock_prediction\gui.py", line 186, in process_finished
    pred_df.to_csv(os.path.join('models', 'predictions.csv'), index=False)
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\util\_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\core\generic.py", line 3720, in to_csv
    return DataFrameRenderer(formatter).to_csv(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\util\_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\formats\format.py", line 1189, in to_csv
    csv_formatter.save()
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\formats\csvs.py", line 241, in save
    with get_handle(
         ^^^^^^^^^^^
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\common.py", line 734, in get_handle
    check_parent_directory(str(handle))
  File "C:\Users\siddh\AppData\Local\Programs\Python\Python311\Lib\site-packages\pandas\io\common.py", line 597, in check_parent_directory
    raise OSError(rf"Cannot save file into a non-existent directory: '{parent}'")
OSError: Cannot save file into a non-existent directory: 'models'