Spaces:
Runtime error
Runtime error
Commit ·
0dc1ccf
1
Parent(s): 2db1b43
new
Browse files
app.py
CHANGED
|
@@ -61,29 +61,33 @@ with gr.Blocks() as demo:
|
|
| 61 |
|
| 62 |
# Add Task Section
|
| 63 |
with gr.Row():
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
add_button.click(
|
| 89 |
fn=add_task,
|
|
@@ -92,8 +96,9 @@ with gr.Blocks() as demo:
|
|
| 92 |
)
|
| 93 |
|
| 94 |
# Delete Task Section
|
| 95 |
-
|
| 96 |
-
|
|
|
|
| 97 |
|
| 98 |
delete_button.click(
|
| 99 |
fn=delete_task,
|
|
|
|
| 61 |
|
| 62 |
# Add Task Section
|
| 63 |
with gr.Row():
|
| 64 |
+
with gr.Column(scale=3):
|
| 65 |
+
task_input = gr.Textbox(
|
| 66 |
+
label="Task",
|
| 67 |
+
placeholder="Enter your task...",
|
| 68 |
+
elem_id="input-box"
|
| 69 |
+
)
|
| 70 |
+
with gr.Column(scale=1):
|
| 71 |
+
priority_input = gr.Dropdown(
|
| 72 |
+
choices=["Low", "Medium", "High"],
|
| 73 |
+
label="Priority",
|
| 74 |
+
value="Medium",
|
| 75 |
+
elem_id="dropdown"
|
| 76 |
+
)
|
| 77 |
+
status_input = gr.Dropdown(
|
| 78 |
+
choices=["Not Started", "In Progress", "Completed"],
|
| 79 |
+
label="Status",
|
| 80 |
+
value="Not Started",
|
| 81 |
+
elem_id="dropdown"
|
| 82 |
+
)
|
| 83 |
+
with gr.Column(scale=2):
|
| 84 |
+
due_date_input = gr.Textbox(
|
| 85 |
+
label="Due Date (YYYY-MM-DD)",
|
| 86 |
+
placeholder="YYYY-MM-DD",
|
| 87 |
+
elem_id="input-box"
|
| 88 |
+
)
|
| 89 |
+
with gr.Column(scale=1):
|
| 90 |
+
add_button = gr.Button("Add Task", elem_id="button")
|
| 91 |
|
| 92 |
add_button.click(
|
| 93 |
fn=add_task,
|
|
|
|
| 96 |
)
|
| 97 |
|
| 98 |
# Delete Task Section
|
| 99 |
+
with gr.Row():
|
| 100 |
+
delete_index = gr.Number(label="Task Index to Delete", value=0, elem_id="input-box")
|
| 101 |
+
delete_button = gr.Button("Delete Task", elem_id="button")
|
| 102 |
|
| 103 |
delete_button.click(
|
| 104 |
fn=delete_task,
|