Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,14 +51,11 @@ def fetch_and_clean_data(url):
|
|
| 51 |
return data
|
| 52 |
|
| 53 |
if st.checkbox("Clear All"):
|
| 54 |
-
|
| 55 |
-
|
| 56 |
|
| 57 |
-
@st.experimental_singleton
|
| 58 |
-
def get_database_session():
|
| 59 |
-
# Create a database session object that points to the URL.
|
| 60 |
try:
|
| 61 |
-
|
| 62 |
repo_id=DATASET_REPO_ID,
|
| 63 |
filename=DATA_FILENAME,
|
| 64 |
cache_dir=DATA_DIRNAME,
|
|
@@ -66,9 +63,10 @@ def get_database_session():
|
|
| 66 |
)
|
| 67 |
except:
|
| 68 |
print("file not found")
|
| 69 |
-
repo = Repository(local_dir="data", clone_from=DATASET_REPO_URL,
|
| 70 |
-
return session
|
| 71 |
-
|
|
|
|
| 72 |
def generate_html() -> str:
|
| 73 |
with open(DATA_FILE) as csvfile:
|
| 74 |
reader = csv.DictReader(csvfile)
|
|
|
|
| 51 |
return data
|
| 52 |
|
| 53 |
if st.checkbox("Clear All"):
|
| 54 |
+
# Clear values from *all* memoized functions
|
| 55 |
+
st.experimental_memo.clear()
|
| 56 |
|
|
|
|
|
|
|
|
|
|
| 57 |
try:
|
| 58 |
+
hf_hub_download(
|
| 59 |
repo_id=DATASET_REPO_ID,
|
| 60 |
filename=DATA_FILENAME,
|
| 61 |
cache_dir=DATA_DIRNAME,
|
|
|
|
| 63 |
)
|
| 64 |
except:
|
| 65 |
print("file not found")
|
| 66 |
+
repo = Repository(local_dir="data", clone_from=DATASET_REPO_URL,use_auth_token=HF_TOKEN)
|
| 67 |
+
# return session
|
| 68 |
+
print(repo)
|
| 69 |
+
|
| 70 |
def generate_html() -> str:
|
| 71 |
with open(DATA_FILE) as csvfile:
|
| 72 |
reader = csv.DictReader(csvfile)
|