Spaces:
Runtime error
Runtime error
change argument script
Browse files
app.py
CHANGED
@@ -30,19 +30,19 @@ print(f"Argument 2: {arg2}")
|
|
30 |
|
31 |
if len(sys.argv) > 1:
|
32 |
# sys.argv[0] is the script name, sys.argv[1] is the first argument, etc.
|
33 |
-
runModel =
|
34 |
print(f"Passed value: {runModel}")
|
35 |
-
print (
|
36 |
|
37 |
else:
|
38 |
print("No argument was passed.")
|
39 |
|
40 |
|
41 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
42 |
-
modelNameToUse =
|
43 |
|
44 |
if (runModel=='1'):
|
45 |
-
dataFileName =
|
46 |
print (dataFileName)
|
47 |
# Load the data from the CSV file
|
48 |
df = pd.read_csv(dataFileName)
|
|
|
30 |
|
31 |
if len(sys.argv) > 1:
|
32 |
# sys.argv[0] is the script name, sys.argv[1] is the first argument, etc.
|
33 |
+
runModel = arg1
|
34 |
print(f"Passed value: {runModel}")
|
35 |
+
print (arg2)
|
36 |
|
37 |
else:
|
38 |
print("No argument was passed.")
|
39 |
|
40 |
|
41 |
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
|
42 |
+
modelNameToUse = arg2
|
43 |
|
44 |
if (runModel=='1'):
|
45 |
+
dataFileName = arg2 + '.csv'
|
46 |
print (dataFileName)
|
47 |
# Load the data from the CSV file
|
48 |
df = pd.read_csv(dataFileName)
|