Seetha commited on
Commit
f648e82
1 Parent(s): add49a5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -5
app.py CHANGED
@@ -18,10 +18,25 @@ with open('./level2.json','w') as dat:
18
  dat.write('hello hello')
19
  #st.write(data_after)
20
 
21
- bin_file = open('./level2.json', 'rb')
22
 
23
- # Execute the request
24
- response = requests.post('https://huggingface.co/datasets/Seetha/Visualization', files={'file': bin_file})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
 
26
- # Close the file
27
- bin_file.close()
 
18
  dat.write('hello hello')
19
  #st.write(data_after)
20
 
21
+ # bin_file = open('./level2.json', 'rb')
22
 
23
+ # # Execute the request
24
+ # response = requests.post('https://huggingface.co/datasets/Seetha/Visualization', files={'file': bin_file})
25
+
26
+ # # Close the file
27
+ # bin_file.close()
28
+
29
+ from datasets import load_dataset
30
+
31
+ # Load the dataset
32
+ dataset = load_dataset("Seetha/Visualization")
33
+
34
+ # Make changes to the dataset
35
+ # ...
36
+
37
+ # Save the changed dataset to a file
38
+ dataset.save_to_disk('./level.json')
39
+
40
+ # In your Streamlit app, load the dataset from the file
41
+ dataset = load_dataset('json', data_files='./level.json')
42