Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -75,13 +75,12 @@ from datasets import load_dataset
|
|
75 |
import huggingface_hub
|
76 |
from huggingface_hub import Repository
|
77 |
from datetime import datetime
|
78 |
-
|
79 |
|
80 |
DATASET_REPO_URL = "https://huggingface.co/datasets/Seetha/visual_files"
|
81 |
DATA_FILENAME = "level2.json"
|
82 |
-
DATA_FILE = os.path.join(
|
83 |
-
|
84 |
-
st.write(DATA_pat)
|
85 |
|
86 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
87 |
|
@@ -511,7 +510,7 @@ def main():
|
|
511 |
#st.write(dataset)
|
512 |
|
513 |
# Write JSON to file
|
514 |
-
with open(
|
515 |
st.write(f)
|
516 |
json.dump(json_data, f)
|
517 |
repo.push_to_hub()
|
|
|
75 |
import huggingface_hub
|
76 |
from huggingface_hub import Repository
|
77 |
from datetime import datetime
|
78 |
+
|
79 |
|
80 |
DATASET_REPO_URL = "https://huggingface.co/datasets/Seetha/visual_files"
|
81 |
DATA_FILENAME = "level2.json"
|
82 |
+
DATA_FILE = os.path.join(DATASET_REPO_URL, DATA_FILENAME)
|
83 |
+
st.write(DATA_FILE)
|
|
|
84 |
|
85 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
86 |
|
|
|
510 |
#st.write(dataset)
|
511 |
|
512 |
# Write JSON to file
|
513 |
+
with open(DATA_FILE, 'w') as f: #w+
|
514 |
st.write(f)
|
515 |
json.dump(json_data, f)
|
516 |
repo.push_to_hub()
|