Onurcan Genç commited on
Commit
daa71a4
·
1 Parent(s): 6b3c76e
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -42,11 +42,14 @@ def execute_task(task):
42
  # CLI interface using argparse
43
  def cli_interface():
44
  parser = argparse.ArgumentParser(description="Command-line interaction with OpenInterpreter.")
45
- parser.add_argument("--task", type=str, required=True, help="The task or command to execute")
46
  args = parser.parse_args()
47
 
 
 
 
48
  # Execute the task and print the result
49
- result = execute_task(args.task)
50
  print(result)
51
 
52
  # Main entry point for the script
 
42
  # CLI interface using argparse
43
  def cli_interface():
44
  parser = argparse.ArgumentParser(description="Command-line interaction with OpenInterpreter.")
45
+ parser.add_argument("--task", type=str, help="The task or command to execute")
46
  args = parser.parse_args()
47
 
48
+ # Provide a default task if none is provided
49
+ task = args.task if args.task else "Tell me a joke"
50
+
51
  # Execute the task and print the result
52
+ result = execute_task(task)
53
  print(result)
54
 
55
  # Main entry point for the script