Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
TDDE19-group-5-pepper
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TDDE19-2021-5
TDDE19-group-5-pepper
Commits
35ef2879
Commit
35ef2879
authored
3 years ago
by
Simon Wijk Stranius
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused code, uncomment
parent
050e31e4
No related branches found
No related tags found
No related merge requests found
Pipeline
#59543
passed
3 years ago
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lhw_intelligence/lhw_intelligence/states/emotional_pepper.py
+0
-29
0 additions, 29 deletions
..._intelligence/lhw_intelligence/states/emotional_pepper.py
with
0 additions
and
29 deletions
src/lhw_intelligence/lhw_intelligence/states/emotional_pepper.py
+
0
−
29
View file @
35ef2879
...
...
@@ -272,28 +272,6 @@ class EmotionalPepper(State):
def
__emotions_cb
(
self
,
emotions
):
self
.
log
.
info
(
"
Got emotion_s_ cb
"
)
self
.
log
.
info
(
str
(
emotions
))
# TODO: Use z-index. E.g. the person in the back looks angry
# id = emotions.id
# emotion = emotions.dominant_emotion
# self.log.info(str(emotions))
# # New person!
# if id not in self.people:
# self.say(f"Oh wow, a new person. I'll remember you as {id}")
# self.people[id] = Person(id, emotion)
# self.trigger_ask_for_name()
# else: # Known person!
# time_to_say_hello = self.people[id].time_since_or_create("greet", 20)
# self.log.info(f"Time to say hello: {time_to_say_hello}")
# if self.people[id].is_forgotten or (time_to_say_hello and self.people[id].time_since_or_create("seen", 20)):
# self.say(f"Nice to see you {id}")
# self.people[id].feel(emotion)
# self.people[id].seen()
# # TODO: Move this to the enter of ask_for_name and put it in the else above
# if self.people[id].new_emotion:
# self.trigger_analyze_emotion(emotion={"id": emotions.id, "emotion": emotions.dominant_emotion})
def
__nlp_emotion_cb
(
self
,
emotions
):
emotion
=
emotions
.
dominant_emotion
...
...
@@ -310,17 +288,10 @@ class EmotionalPepper(State):
self
.
log
.
info
(
"
\t
"
.
join
(
s_lst
))
self
.
fh_nlp
.
write
(
"
\t
"
.
join
(
s_lst
))
self
.
fh_nlp
.
write
(
"
\n
"
)
return
self
.
new_nlp_emotion
=
True
self
.
nlp_emotion
=
dominant
# TODO: May not be a good idea to send unknown id
self
.
trigger_analyze_emotion
(
emotion
=
{
"
id
"
:
-
1
,
"
emotion
"
:
dominant
})
def
__dialogflow_cb
(
self
,
dialogflow_msg
):
lst
=
[
time
.
time
()
-
self
.
start_time
,
dialogflow_msg
.
recognized_text
]
s_lst
=
[
str
(
s
)
for
s
in
lst
]
self
.
log
.
info
(
"
\t
"
.
join
(
s_lst
))
self
.
fh_df
.
write
(
"
\t
"
.
join
(
s_lst
))
self
.
fh_df
.
write
(
"
\n
"
)
class
StateMachineNode
(
Node
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment