Seetha commited on
Commit
2d78e5f
1 Parent(s): 186d6b7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- from pathlib import path
79
 
80
  DATASET_REPO_URL = "https://huggingface.co/datasets/Seetha/visual_files"
81
  DATA_FILENAME = "level2.json"
82
- DATA_FILE = os.path.join("level2", DATA_FILENAME)
83
- DATA_pat = Path("https://huggingface.co/datasets/Seetha/visual_files") / f"level2.json"
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(DATA_pat, 'w') as f: #w+
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()