Seetha commited on
Commit
e2ba2da
1 Parent(s): 1e0d834

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -2,8 +2,11 @@ import urllib.request
2
  import streamlit as st
3
  with urllib.request.urlopen('https://huggingface.co/datasets/Seetha/visual_files/raw/main/level2.json') as response:
4
  data = response.read()
5
- st.write(data)
6
 
7
- with open('level2.json','w') as fi:
 
 
 
8
  fi.write(str(data))
 
9
 
 
2
  import streamlit as st
3
  with urllib.request.urlopen('https://huggingface.co/datasets/Seetha/visual_files/raw/main/level2.json') as response:
4
  data = response.read()
 
5
 
6
+ with open('level2.json','r+') as fi:
7
+ data = fi.read()
8
+ st.write(data)
9
+ fi.seek(0)
10
  fi.write(str(data))
11
+ fi.truncate
12