Spaces:
Running
Running
Daniel Gil-U Fuhge
commited on
Commit
•
d019106
1
Parent(s):
d228bd9
update app
Browse files
app.py
CHANGED
@@ -6,6 +6,8 @@ uploaded_file = st.file_uploader('Please upload your SVG')
|
|
6 |
if uploaded_file is not None:
|
7 |
file_details = {"FileName":uploaded_file.name,"FileType":uploaded_file.type}
|
8 |
st.write(file_details)
|
|
|
|
|
9 |
with open(os.path.join("tempDir",uploaded_file.name),"wb") as f:
|
10 |
f.write(uploaded_file.getbuffer())
|
11 |
st.success("Saved File")
|
|
|
6 |
if uploaded_file is not None:
|
7 |
file_details = {"FileName":uploaded_file.name,"FileType":uploaded_file.type}
|
8 |
st.write(file_details)
|
9 |
+
if not os.path.exists('tempDir'):
|
10 |
+
os.mkdir('tempDir')
|
11 |
with open(os.path.join("tempDir",uploaded_file.name),"wb") as f:
|
12 |
f.write(uploaded_file.getbuffer())
|
13 |
st.success("Saved File")
|