Rauhan commited on
Commit
f6ab159
·
verified ·
1 Parent(s): fe70267

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -36,7 +36,12 @@ if dataFile != None:
36
  prompt = st.text_area("Enter your query, question, or desired operation")
37
 
38
  if st.button("Generate Answer"):
39
- chartsDirectory = os.path.join("exports", "charts")
 
 
 
 
 
40
  if os.path.isdir(chartsDirectory):
41
  if len(os.listdir(chartsDirectory)) != 0:
42
  shutil.rmtree(chartsDirectory)
 
36
  prompt = st.text_area("Enter your query, question, or desired operation")
37
 
38
  if st.button("Generate Answer"):
39
+ path = os.path.join("exports", "charts")
40
+ if os.path.isdir(path):
41
+ pass
42
+ else:
43
+ os.makedirs(path)
44
+ chartsDirectory = path
45
  if os.path.isdir(chartsDirectory):
46
  if len(os.listdir(chartsDirectory)) != 0:
47
  shutil.rmtree(chartsDirectory)