streamlit security 썸네일형 리스트형 How to deploy in Streamlit with Unsplash API (Streamlit에서 Unsplash, chatgpt API 사용 보안 관련 문제) 1. Cursor로 Code를 생성하면 Unsplash는 이런 코드를 준다.UNSPLASH_ACCESS_KEY ="키넣어주세요" def get_random_image(): try: # Unsplash API를 사용하여 가로형 무작위 이미지 가져오기 response = requests.get( f"https://api.unsplash.com/photos/random?orientation=landscape&client_id={UNSPLASH_ACCESS_KEY}" ) response.raise_for_status() # HTTP 오류가 발생하면 예외를 발생시킵니다. data = response.json() .. 더보기 이전 1 다음