AI4Finance-Foundation / FinGPT

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

FinGPT-v1 , errors with download_titles.py #34

Open TGLTommy opened 1 year ago

TGLTommy commented 1 year ago

I don't understand what does al_re mean ?

# ATTENTION! Should replace this with your results path!
al_re = os.listdir(r"D:\python_project\FinRL-Meta\experiment\scrape\results")
al_re = [al.split(".")[0] for al in al_re]
zhumingpassional commented 1 year ago

@TommyTang930 thanks for reporting it.

@oliverwang15 it maybe useless. pls check it. In addition, in linux or macos, there is no "D:" or "backslash"

oliverwang15 commented 1 year ago

Hi, TommyTang930. al_re is the folder for your downloaded data. Since the download process might fail lots of times, combining with the codes in line 19 to line 20 as shown below in the get_news_data function, we can avoid redownloading the stocks that have finished downloading. You may replace r"D:\python_project\FinRL-Meta\experiment\scrape\results" with your own folder path.

17  def get_news_data( stock ):
18      print(f"Collecting {stock}")
19      if stock in al_re:
20          return