Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,15 @@ import json
|
|
22 |
# Load configuration file
|
23 |
with open('config.json', 'r') as config_file:
|
24 |
config = json.load(config_file)
|
|
|
|
|
|
|
25 |
arg1 = config.get('arg1', 'default_value1')
|
26 |
arg2 = config.get('arg2', 'default_value2')
|
27 |
|
28 |
print(f"Argument 1: {arg1}")
|
29 |
print(f"Argument 2: {arg2}")
|
30 |
|
31 |
-
num_args = len(config)
|
32 |
|
33 |
if len(num_args) > 1:
|
34 |
# sys.argv[0] is the script name, sys.argv[1] is the first argument, etc.
|
|
|
22 |
# Load configuration file
|
23 |
with open('config.json', 'r') as config_file:
|
24 |
config = json.load(config_file)
|
25 |
+
|
26 |
+
num_args = len("argument length", config)
|
27 |
+
|
28 |
arg1 = config.get('arg1', 'default_value1')
|
29 |
arg2 = config.get('arg2', 'default_value2')
|
30 |
|
31 |
print(f"Argument 1: {arg1}")
|
32 |
print(f"Argument 2: {arg2}")
|
33 |
|
|
|
34 |
|
35 |
if len(num_args) > 1:
|
36 |
# sys.argv[0] is the script name, sys.argv[1] is the first argument, etc.
|