Spaces:
Running
Running
Upload useftools.py
Browse files- tools/useftools.py +14 -0
tools/useftools.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import pandas as pd
|
2 |
+
import os
|
3 |
+
|
4 |
+
URL = "https://docs.google.com/spreadsheets/d/1tAUaQrEHYgRsm1Lvrnj14HFHDwJWl0Bd9x0QePewNco/edit#gid=1977693859"
|
5 |
+
csv_url = URL.replace('/edit#gid=', '/export?format=csv&gid=')
|
6 |
+
if os.path.exists("spreadsheet.csv"):
|
7 |
+
cached_data = pd.read_csv("spreadsheet.csv")
|
8 |
+
else:
|
9 |
+
cached_data = pd.read_csv(csv_url)
|
10 |
+
cached_data.to_csv("spreadsheet.csv", index=False)
|
11 |
+
models = {}
|
12 |
+
|
13 |
+
for url, filename in zip(cached_data['URL'], cached_data['Filename']):
|
14 |
+
models[filename] = url
|