andreped commited on
Commit
11c4595
·
1 Parent(s): 4aa704f

Added download_test_data method

Browse files
Files changed (1) hide show
  1. knowledge_gpt/core/data.py +12 -0
knowledge_gpt/core/data.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from gdown import download_folder
3
+
4
+
5
+ @st.cache_resource(show_spinner=False)
6
+ def download_test_data():
7
+ # url = f"https://drive.google.com/drive/folders/uc?export=download&confirm=pbef&id={file_id}"
8
+ url = "https://drive.google.com/drive/folders/1uDSAWtLvp1YPzfXUsK_v6DeWta16pq6y"
9
+ with st.spinner(text="Downloading test data. This might take a minute."):
10
+ # @TODO: replace gown solution with a custom solution compatible with GitHub and
11
+ # use st.progress to get more verbose during download
12
+ download_folder(url=url, quiet=False, use_cookies=False, output="./data/")