eddddyy commited on
Commit
b0358d0
·
verified ·
1 Parent(s): 4236a98

Create command_classifier.py

Browse files
Files changed (1) hide show
  1. command_classifier.py +11 -0
command_classifier.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ def classify_command(command: str) -> str:
2
+ command = command.lower()
3
+ if "open" in command and any(app in command for app in ["chrome", "firefox", "notepad", "calculator"]):
4
+ return "open_app"
5
+ elif "screenshot" in command:
6
+ return "screenshot"
7
+ elif "create" in command and "file" in command:
8
+ return "create_file"
9
+ elif "search" in command or "what is" in command:
10
+ return "web_search"
11
+ return "chat"