Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,13 @@ subtask_map = {
|
|
| 14 |
"Technology": ["Excel Automation", "SQL", "Obsidian/Notion setup"],
|
| 15 |
"Interview": ["Applicant-Checkup CV", "Root-cause analyze", "STAR method for interview"]
|
| 16 |
}
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
# Persistent session storage
|
| 19 |
session_records = []
|
| 20 |
|
|
@@ -23,7 +29,7 @@ def update_subtasks(cat):
|
|
| 23 |
choices = subtask_map.get(cat, [])
|
| 24 |
return gr.Dropdown(choices=choices, value=choices[0] if choices else None)
|
| 25 |
|
| 26 |
-
def save_and_update_table(cat, task, bg, curr, target, root, confirm, follow):
|
| 27 |
global session_records
|
| 28 |
|
| 29 |
new_row = {
|
|
@@ -62,7 +68,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 62 |
task_select = gr.Dropdown(choices=subtask_map["Accountancy"], label="2. Task")
|
| 63 |
|
| 64 |
gr.Markdown("---")
|
| 65 |
-
gr.Markdown("### 🛠
|
| 66 |
bg = gr.Textbox(label="Background", placeholder="Bối cảnh vấn đề...")
|
| 67 |
curr = gr.Textbox(label="Current Condition", placeholder="Tình trạng hiện tại...")
|
| 68 |
target = gr.Textbox(label="Goal / Target Condition", placeholder="Mục tiêu...")
|
|
@@ -83,7 +89,10 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 83 |
wrap=True,
|
| 84 |
interactive=True
|
| 85 |
)
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
| 87 |
excel_file = gr.File(label="Download Excel report")
|
| 88 |
|
| 89 |
with gr.Accordion("View Knowledge Vault", open=False):
|
|
@@ -101,4 +110,4 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 101 |
outputs=[task_table, excel_file, vault_display]
|
| 102 |
)
|
| 103 |
|
| 104 |
-
demo.launch()
|
|
|
|
| 14 |
"Technology": ["Excel Automation", "SQL", "Obsidian/Notion setup"],
|
| 15 |
"Interview": ["Applicant-Checkup CV", "Root-cause analyze", "STAR method for interview"]
|
| 16 |
}
|
| 17 |
+
training_map = {
|
| 18 |
+
"Softskill": ["Communication", "Networking", "Communciation effectively/On-point"],
|
| 19 |
+
"Psy": ["Mental Health", "Design thinking", "Human nature"],
|
| 20 |
+
"ADHD": ["Autism","Manage your pre-frontal cortex"],
|
| 21 |
+
"Mindset": ["Positivity mindset", "Shift your mindset"],
|
| 22 |
+
"Flow": ["Workflow", "Energy"]
|
| 23 |
+
}
|
| 24 |
# Persistent session storage
|
| 25 |
session_records = []
|
| 26 |
|
|
|
|
| 29 |
choices = subtask_map.get(cat, [])
|
| 30 |
return gr.Dropdown(choices=choices, value=choices[0] if choices else None)
|
| 31 |
|
| 32 |
+
def save_and_update_table(cat, task, bg, training_map, curr, target, root, confirm, follow):
|
| 33 |
global session_records
|
| 34 |
|
| 35 |
new_row = {
|
|
|
|
| 68 |
task_select = gr.Dropdown(choices=subtask_map["Accountancy"], label="2. Task")
|
| 69 |
|
| 70 |
gr.Markdown("---")
|
| 71 |
+
gr.Markdown("### 🛠 Deep Analysis")
|
| 72 |
bg = gr.Textbox(label="Background", placeholder="Bối cảnh vấn đề...")
|
| 73 |
curr = gr.Textbox(label="Current Condition", placeholder="Tình trạng hiện tại...")
|
| 74 |
target = gr.Textbox(label="Goal / Target Condition", placeholder="Mục tiêu...")
|
|
|
|
| 89 |
wrap=True,
|
| 90 |
interactive=True
|
| 91 |
)
|
| 92 |
+
with gr.markdown("Training/Development/Framework")
|
| 93 |
+
training = gr.Dropdown(choices=list(subtask_map.keys()), label="training")
|
| 94 |
+
task_select = gr.Textbox(label="what is your training")
|
| 95 |
+
suggestion = gr.Textbox(label="url")
|
| 96 |
excel_file = gr.File(label="Download Excel report")
|
| 97 |
|
| 98 |
with gr.Accordion("View Knowledge Vault", open=False):
|
|
|
|
| 110 |
outputs=[task_table, excel_file, vault_display]
|
| 111 |
)
|
| 112 |
|
| 113 |
+
demo.launch(share=True)
|