EunsuKim commited on
Commit
1c7801c
1 Parent(s): 50de557

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -57,8 +57,8 @@ def get_tasks_by_type(task_type):
57
  def add_new_task_type(new_type):
58
  if new_type and new_type not in TASK_TYPES:
59
  TASK_TYPES.append(new_type)
60
- return gr.update(choices=TASK_TYPES), gr.update(choices=TASK_TYPES), f"Task type '{new_type}' added successfully!"
61
- return gr.update(choices=TASK_TYPES), gr.update(choices=TASK_TYPES), "Task type already exists or invalid input."
62
 
63
  # Function to display tasks as clickable cards
64
  def display_tasks(task_type):
@@ -122,7 +122,7 @@ with gr.Blocks() as app:
122
  add_task_button.click(
123
  add_new_task_type,
124
  inputs=[new_task_input],
125
- outputs=[task_type_input, task_type_filter, add_task_status] # Update dropdown and status
126
  )
127
 
128
  # Handle task submission
 
57
  def add_new_task_type(new_type):
58
  if new_type and new_type not in TASK_TYPES:
59
  TASK_TYPES.append(new_type)
60
+ return gr.update(choices=TASK_TYPES), f"Task type '{new_type}' added successfully!"
61
+ return gr.update(choices=TASK_TYPES), "Task type already exists or invalid input."
62
 
63
  # Function to display tasks as clickable cards
64
  def display_tasks(task_type):
 
122
  add_task_button.click(
123
  add_new_task_type,
124
  inputs=[new_task_input],
125
+ outputs=[task_type_input, add_task_status] # Update dropdown and status
126
  )
127
 
128
  # Handle task submission