AI4Finance-Foundation / FinGPT

FinGPT: Open-Source Financial Large Language Models! Revolutionize 🔥 We release the trained model on HuggingFace.
https://ai4finance.org
MIT License
13.84k stars 1.92k forks source link

Update cover_alpaca2jsonl.py #27

Closed Shahupdates closed 1 year ago

Shahupdates commented 1 year ago

In this improved code, I've added logging, and I've also split the logic in the main function into two separate functions, load_data and save_data, for clarity and to make the code more modular. Exception handling for file errors and JSON parsing errors have been added as well. This way, the code is more robust and easier to read.

oliverwang15 commented 1 year ago

Hi, Shahupdates. Thanks for your effort! Have you tested the code, dose it run properly?

Shahupdates commented 1 year ago

Yes, works properly.

oliverwang15 commented 1 year ago

Ok! Thanks!