Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
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 |
-
|
56 |
-
|
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:
|