EunsuKim commited on
Commit
542f5af
·
verified ·
1 Parent(s): 52c683f

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -52,13 +52,8 @@ def get_tasks_by_type(task_type):
52
  def add_new_task_type(new_type):
53
  if new_type and new_type not in TASK_TYPES:
54
  TASK_TYPES.append(new_type)
55
- # Return the updated choices
56
- return TASK_TYPES, f"Task type '{new_type}' added successfully!"
57
- return TASK_TYPES, "Task type already exists or invalid input."
58
-
59
- # Function to switch tabs
60
- def switch_tab(tab_name):
61
- return gr.Tabs.update(visible_tab=tab_name)
62
 
63
  # Gradio App
64
  with gr.Blocks() as app:
 
52
  def add_new_task_type(new_type):
53
  if new_type and new_type not in TASK_TYPES:
54
  TASK_TYPES.append(new_type)
55
+ return gr.update(choices=TASK_TYPES), f"Task type '{new_type}' added successfully!"
56
+ return gr.update(choices=TASK_TYPES), "Task type already exists or invalid input."
 
 
 
 
 
57
 
58
  # Gradio App
59
  with gr.Blocks() as app: