Home Forums Investment Road to FinGPT Road to FinGPT Name * Password * Email <strong>Topic 12</strong>: FinGPT를 로컬에서 돌려보기 (성공) 1. 뭐가 뭔지 찾는 과정 <ul> <li>모든 모델을 브라이징 해보고 https://huggingface.co/models <li>fingpt 검색해서 모델 랜딩 페이지를 읽어 보고 https://huggingface.co/FinGPT/fingpt-forecaster_dow30_llama2-7b_lora <li> FinGPT/FinGPT-Forecaster 링크 눌러서 데모 페이지 테스트 해보고 https://huggingface.co/spaces/FinGPT/FinGPT-Forecaster <li> github 북마크 해두고 https://github.com/AI4Finance-Foundation/FinGPT/tree/master/fingpt/FinGPT_Forecaster <li> Community 링크에서 샘플 코드 url 하나 북마크하고 https://huggingface.co/spaces/FinGPT/FinGPT-Forecaster/blob/main/app.py <li> app.py를 로컬에 저장하고 돌려보면 이런 저런 에러가 나는데 이거저것 없다고 나와서 pip install finnhub finnhub--python pynvml yfinance 해주고 돌려보려니까 없어서 에러나오는 곳이 왜 이리 많아... 해서 아 뭔가 이상해서 보니 저 github 전체가 필요한가 보다. 방향 전환. <li> github을 clone 해서 내용을 살펴보니 보니 FinGPT_Forecaster가 이름을 볼 때 내가 찾던 것인 듯. </ul> 2. 뭘 해야 하는지 찾은 듯, 돌려보자. <ul> <li>git clone https://github.com/AI4Finance-Foundation/FinGPT 해주고 <li>FinGPT_Forecaster로 가서 이걸 뭘로 로딩을 해야 하나? 구글해서 PyCharm을 하나 깔아주고. <li>app.py 실행하니 gradio 없다고 에러? 프로젝에 빵꾸가 하나 있네. 구글해서 requirements.txt 파일에 gradio 하나 추가해주고 다시 실행. Good, 그러나 다음 에러 발생. <li>cp949 인코딩 에러? 구글한테 물어보니 PYTHONUTF8=1을 환경변수 추가하라고. Good, 그러나 다음 에러 발생. <li>환경변수 HF_TOKEN 없다고? 이건 앞에서 해봐서 알지. 환경변수 HF_TOKEN=hf_gPmcZ**** 추가해주고, 다시 실행. Good, 그러나 다음 에러 발생. <li>환경변수 FINNHUB_API_KEY 없다고 에러? 이건 뭐냐, 구글해보니 finnhub.io라는 곳에서 발급하는 뭔 키로군. finnhub.io 가입하고 API Key 하나 FINNHUB_API_KEY=cnv28s1r**** 발급받아 환경변수에 추가 후 다시 실행. Good. <li>마침내 app.py가 시작되는데 Downloading shards: 0%... 메시지 나오고 대략 1시간 정도 걸려서 모델 10GB 다운로드 후 앱이 시작됨 <li>Running on local URL: http://127.0.0.1:7863 메시지 나와서 주소로 접속하니, 온라인에서 본 바로 그 화면이 나옴. 이거. </ul> <img src="https://i.ibb.co/NjpxXvZ/2024-03-22-21-46-30-Fin-GPT-Forecaster.png" width="400" height="400" alt="실행 후 초기화면" /> I agree to the terms of service Comment