ThreatLevelD
commited on
Commit
·
ee2273a
1
Parent(s):
e357eca
Added starter files: main.py, app.py, config, demo scenarios
Browse files- app.py +36 -0
- config/emotion_families.yaml +13 -0
- docs/demo_scenarios.md +15 -0
- main.py +7 -0
- requirements.txt +3 -0
app.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# app.py
|
| 2 |
+
# Gradio Frontend for MEC MVP
|
| 3 |
+
|
| 4 |
+
import gradio as gr
|
| 5 |
+
|
| 6 |
+
demo_scenarios = [
|
| 7 |
+
"I’m feeling really overwhelmed today",
|
| 8 |
+
"I can’t stop thinking about someone I lost",
|
| 9 |
+
"I’m furious about something unfair",
|
| 10 |
+
"I feel hopeful but unsure what to do",
|
| 11 |
+
"I feel inspired but can’t act",
|
| 12 |
+
"I feel numb today"
|
| 13 |
+
]
|
| 14 |
+
|
| 15 |
+
def run_mec_pipeline(input_text):
|
| 16 |
+
# Placeholder response — will connect to MEC pipeline
|
| 17 |
+
return {
|
| 18 |
+
"Primary Emotion": "Pending",
|
| 19 |
+
"Emotion Arc Trajectory": "Pending",
|
| 20 |
+
"Resonance Pattern": "Pending",
|
| 21 |
+
"HEART Compliance Flags": "Pending",
|
| 22 |
+
"Empathy First Response": "This is a placeholder — real empathy engine coming soon!"
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
with gr.Blocks() as demo:
|
| 26 |
+
gr.Markdown("# Test Functional Empathy — Live Demo\n**Empathy first. Not 1984.**\n")
|
| 27 |
+
gr.Markdown("Select an example scenario:")
|
| 28 |
+
|
| 29 |
+
scenario = gr.Radio(choices=demo_scenarios, label="Example Scenarios")
|
| 30 |
+
run_button = gr.Button("Run Demo")
|
| 31 |
+
|
| 32 |
+
output = gr.JSON(label="MEC Response")
|
| 33 |
+
|
| 34 |
+
run_button.click(fn=run_mec_pipeline, inputs=scenario, outputs=output)
|
| 35 |
+
|
| 36 |
+
demo.launch()
|
config/emotion_families.yaml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# emotion_families.yaml - placeholder for MEC MVP
|
| 2 |
+
|
| 3 |
+
emotion_families:
|
| 4 |
+
- name: Joy
|
| 5 |
+
code: FAM-JOY
|
| 6 |
+
- name: Sadness
|
| 7 |
+
code: FAM-SAD
|
| 8 |
+
- name: Anger
|
| 9 |
+
code: FAM-ANG
|
| 10 |
+
- name: Fear
|
| 11 |
+
code: FAM-FEA
|
| 12 |
+
- name: Love
|
| 13 |
+
code: FAM-LOV
|
docs/demo_scenarios.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MVP Demo Scenarios
|
| 2 |
+
|
| 3 |
+
🎭 Scenario List:
|
| 4 |
+
|
| 5 |
+
- "I’m feeling really overwhelmed today"
|
| 6 |
+
- "I can’t stop thinking about someone I lost"
|
| 7 |
+
- "I’m furious — something really unfair happened"
|
| 8 |
+
- "I feel hopeful about the future… but unsure what to do"
|
| 9 |
+
- "I feel inspired, but can’t seem to act"
|
| 10 |
+
- "I just feel numb today"
|
| 11 |
+
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
Empathy first. Not 1984.
|
| 15 |
+
Functional Empathy | HEART Framework | AI Empathy Ethics
|
main.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# main.py
|
| 2 |
+
# MVP Test Runner for Master Emotional Core (MEC)
|
| 3 |
+
|
| 4 |
+
print("MEC MVP Test Runner")
|
| 5 |
+
print("System ready — modules loading...")
|
| 6 |
+
|
| 7 |
+
# Placeholder — real modules will import from core/
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio
|
| 2 |
+
pyyaml
|
| 3 |
+
numpy
|