-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.kv
More file actions
140 lines (121 loc) · 3.31 KB
/
gui.kv
File metadata and controls
140 lines (121 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<MainWindow>:
orientation: 'vertical'
padding: 10
spacing: 10
BoxLayout:
size_hint: 1, 0.1
spacing: 10
Button:
id: listen_btn
text: 'Start Listening'
on_press: root.toggle_listening()
Button:
text: 'Settings'
size_hint: 0.3, 1
on_press: root.open_settings()
ScrollView:
size_hint: 1, 0.7
Label:
id: chat_log
size_hint_y: None
height: self.texture_size[1]
text_size: self.width, None
halign: 'left'
valign: 'top'
padding: 10, 10
<SettingsDialog>:
title: 'Trigger Words & Emotion Thresholds'
size_hint: 0.8, 0.8
BoxLayout:
orientation: 'vertical'
padding: 10
spacing: 10
Label:
text: 'Trigger Words (comma-separated):'
size_hint_y: None
height: 30
TextInput:
id: trigger_words_input
size_hint_y: None
height: 60
GridLayout:
cols: 3
spacing: 10
size_hint_y: 0.6
Label:
text: 'Emotion'
bold: True
Label:
text: 'Threshold'
bold: True
Label:
text: 'Value'
bold: True
# Emotion sliders
Label:
text: 'Sadness'
Slider:
id: sadness_slider
min: 0
max: 1
step: 0.05
Label:
id: sadness_value
text: '{:.2f}'.format(sadness_slider.value)
# Repeat for other emotions...
# [Similar blocks for joy, love, anger, fear, surprise]
Label:
text: 'Joy'
Slider:
id: joy_slider
min: 0
max: 1
step: 0.05
Label:
id: joy_value
text: '{:.2f}'.format(joy_slider.value)
Label:
text: 'Love'
Slider:
id: love_slider
min: 0
max: 1
step: 0.05
Label:
id: love_value
text: '{:.2f}'.format(love_slider.value)
Label:
text: 'Anger'
Slider:
id: anger_slider
min: 0
max: 1
step: 0.05
Label:
id: anger_value
text: '{:.2f}'.format(anger_slider.value)
Label:
text: 'Fear'
Slider:
id: fear_slider
min: 0
max: 1
step: 0.05
Label:
id: fear_value
text: '{:.2f}'.format(fear_slider.value)
Label:
text: 'Surprise'
Slider:
id: surprise_slider
min: 0
max: 1
step: 0.05
Label:
id: surprise_value
text: '{:.2f}'.format(surprise_slider.value)
Button:
text: 'Save'
size_hint_y: None
height: 40
on_press: root.save_settings()