cbg342 commited on
Commit
df7ab32
1 Parent(s): 44c2e88

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -58,9 +58,9 @@ d = {'GPT Commands': ['GOOGLE("question")', 'PYTHON(script.py)', 'MAKEFILE("cont
58
  }
59
  df = pd.DataFrame(data=d, dtype='string')
60
  commandTable = st.experimental_data_editor(df, use_container_width=True, num_rows='dynamic')
61
- cola, colb, colc = st.columns(3)
62
  st.markdown('### Upload/Download')
63
  uploadFile = st.file_uploader('')
 
64
  with cola:
65
  if st.button('Upload'):
66
  if uploadFile:
@@ -70,10 +70,10 @@ with cola:
70
  st.write('Success')
71
  with colb:
72
  if st.button('Download'):
73
- shutil.make_archive(os.join(thispath, 'files.zip'), 'zip', os.join(thispath, 'files'))
74
  st.session_state['downloadable'] = True
75
  with colc:
76
- if st.session_state['downloadble']:
77
  with open(os.path.join(thispath, 'files.zip'), 'rb') as f:
78
  st.download_button('Download Zip', f, file_name='file.zip', key='filezip')
79
  st.markdown('### Chat')
@@ -182,11 +182,10 @@ if st.session_state['running']:
182
  else:
183
  st.warning('Make sure OpenAI key and prompt entered', icon='⚠️')
184
 
185
- col5, col6 = st.columns(2)
186
  if st.session_state['acceptreject']:
187
 
188
  st.warning('GPT is trying to run the following command: ' + st.session_state['command'] + '\nPlease approve or deny this request.')
189
-
190
  with col5:
191
  if st.button('Approve'):
192
  st.session_state['acceptreject'] = False
 
58
  }
59
  df = pd.DataFrame(data=d, dtype='string')
60
  commandTable = st.experimental_data_editor(df, use_container_width=True, num_rows='dynamic')
 
61
  st.markdown('### Upload/Download')
62
  uploadFile = st.file_uploader('')
63
+ cola, colb, colc = st.columns(3)
64
  with cola:
65
  if st.button('Upload'):
66
  if uploadFile:
 
70
  st.write('Success')
71
  with colb:
72
  if st.button('Download'):
73
+ shutil.make_archive(os.path.join(thispath, 'files'), 'zip', os.path.join(thispath, 'files'))
74
  st.session_state['downloadable'] = True
75
  with colc:
76
+ if st.session_state['downloadable']:
77
  with open(os.path.join(thispath, 'files.zip'), 'rb') as f:
78
  st.download_button('Download Zip', f, file_name='file.zip', key='filezip')
79
  st.markdown('### Chat')
 
182
  else:
183
  st.warning('Make sure OpenAI key and prompt entered', icon='⚠️')
184
 
 
185
  if st.session_state['acceptreject']:
186
 
187
  st.warning('GPT is trying to run the following command: ' + st.session_state['command'] + '\nPlease approve or deny this request.')
188
+ col5, col6 = st.columns(2)
189
  with col5:
190
  if st.button('Approve'):
191
  st.session_state['acceptreject'] = False