Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -510,12 +510,9 @@ def main():
|
|
510 |
#fi.seek(0)
|
511 |
with open('smalljson.json','r+') as fi:
|
512 |
data = json.load(fi)
|
513 |
-
st.write(data)
|
514 |
fi.seek(0)
|
515 |
fi.write(json_data)
|
516 |
-
# json.dump(json_data,fi)
|
517 |
-
# data_after = json.load(fi)
|
518 |
-
#st.write('after',data_after)
|
519 |
fi.truncate()
|
520 |
# file_jso.truncate(0)
|
521 |
# file_jso.write(json_data)
|
@@ -580,15 +577,17 @@ def main():
|
|
580 |
# side_css('side.css')
|
581 |
|
582 |
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
|
588 |
# css_file = CSS_PATH / "tree.css"
|
589 |
# css_file1 = CSS_PATH / "div.css"
|
590 |
# css_file2 = CSS_PATH / "side.css"
|
591 |
-
|
|
|
|
|
592 |
# shutil.copy("assets/css/tree.css", css_file)
|
593 |
# shutil.copy("assets/css/div.css", css_file1)
|
594 |
# shutil.copy("assets/css/side.css", css_file2)
|
|
|
510 |
#fi.seek(0)
|
511 |
with open('smalljson.json','r+') as fi:
|
512 |
data = json.load(fi)
|
513 |
+
#st.write(data)
|
514 |
fi.seek(0)
|
515 |
fi.write(json_data)
|
|
|
|
|
|
|
516 |
fi.truncate()
|
517 |
# file_jso.truncate(0)
|
518 |
# file_jso.write(json_data)
|
|
|
577 |
# side_css('side.css')
|
578 |
|
579 |
|
580 |
+
STREAMLIT_STATIC_PATH = pathlib.Path(st.__path__[0]) / 'static'
|
581 |
+
CSS_PATH = (STREAMLIT_STATIC_PATH / "assets/css")
|
582 |
+
if not CSS_PATH.is_dir():
|
583 |
+
CSS_PATH.mkdir()
|
584 |
|
585 |
# css_file = CSS_PATH / "tree.css"
|
586 |
# css_file1 = CSS_PATH / "div.css"
|
587 |
# css_file2 = CSS_PATH / "side.css"
|
588 |
+
css_file2 = CSS_PATH / "ch.json"
|
589 |
+
if not css_file.exists():
|
590 |
+
shutil.copy("assets/css/ch.json", css_file2)
|
591 |
# shutil.copy("assets/css/tree.css", css_file)
|
592 |
# shutil.copy("assets/css/div.css", css_file1)
|
593 |
# shutil.copy("assets/css/side.css", css_file2)
|