Quazim0t0 commited on
Commit
1f604b7
ยท
verified ยท
1 Parent(s): d870c12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -243,7 +243,7 @@ with gr.Blocks() as demo:
243
 
244
  def handle_upload(file):
245
  success, message = process_uploaded_file(file)
246
- return message, gr.Button.update(visible=success)
247
 
248
  def update_schema():
249
  schema = get_table_schema()
@@ -253,17 +253,17 @@ with gr.Blocks() as demo:
253
 
254
  def switch_to_query():
255
  return {
256
- upload_group: gr.Group.update(visible=False),
257
- query_group: gr.Group.update(visible=True),
258
  schema_display: update_schema()
259
  }
260
 
261
  def switch_to_upload():
262
  return {
263
- upload_group: gr.Group.update(visible=True),
264
- query_group: gr.Group.update(visible=False),
265
- continue_btn: gr.Button.update(visible=False),
266
- upload_status: gr.Textbox.update(value="")
267
  }
268
 
269
  # Event handlers
@@ -300,4 +300,4 @@ with gr.Blocks() as demo:
300
  )
301
 
302
  if __name__ == "__main__":
303
- demo.launch(server_name="0.0.0.0", server_port=7860, share=True)
 
243
 
244
  def handle_upload(file):
245
  success, message = process_uploaded_file(file)
246
+ return message, gr.update(visible=success)
247
 
248
  def update_schema():
249
  schema = get_table_schema()
 
253
 
254
  def switch_to_query():
255
  return {
256
+ upload_group: gr.update(visible=False),
257
+ query_group: gr.update(visible=True),
258
  schema_display: update_schema()
259
  }
260
 
261
  def switch_to_upload():
262
  return {
263
+ upload_group: gr.update(visible=True),
264
+ query_group: gr.update(visible=False),
265
+ continue_btn: gr.update(visible=False),
266
+ upload_status: gr.update(value="")
267
  }
268
 
269
  # Event handlers
 
300
  )
301
 
302
  if __name__ == "__main__":
303
+ demo.launch(server_name="0.0.0.0", server_port=7860)