Connor Adams commited on
Commit
7033ed5
·
1 Parent(s): ef01a34

Allow test to take arguments

Browse files
Files changed (1) hide show
  1. test.py +9 -1
test.py CHANGED
@@ -1,7 +1,15 @@
 
1
  from agent import BasicAgent
2
 
3
  agent = BasicAgent()
4
 
5
- result = agent("What is the capital of France?")
 
 
 
 
 
 
 
6
 
7
  print(result)
 
1
+ import sys
2
  from agent import BasicAgent
3
 
4
  agent = BasicAgent()
5
 
6
+ # Get the question from command-line arguments
7
+ if len(sys.argv) > 1:
8
+ question = sys.argv[1]
9
+ else:
10
+ question = "What is the capital of France?"
11
+
12
+
13
+ result = agent(question)
14
 
15
  print(result)