File size: 544 Bytes
36bbacc
c9d6da6
ac3ed37
ca66fd2
9650f42
 
 
00f9a85
e2ba2da
d2082a1
e2ba2da
d2082a1
9165b8b
65d1ed4
d2082a1
 
 
00f9a85
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import urllib.request
import streamlit as st
import os
from datasets import load_from_disk
with urllib.request.urlopen('https://huggingface.co/datasets/Seetha/visual_files/raw/main/level2.json') as response:
    data = response.read()

with open('./level2.json','r+') as fi:
    data = fi.read()
    st.write('before change', data)
    fi.seek(0)
    fi.write('Hello world!')
    fi.truncate()
    st.write(os.path.abspath("level2.json"))

with open('/home/user/app/level2.json','r') as dat:
    data_after = dat.read()
    st.write(data_after)