Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -133,14 +133,28 @@ def changedatashape():
|
|
133 |
os.remove('sample.csv')
|
134 |
|
135 |
|
136 |
-
command =
|
137 |
-
|
138 |
-
|
139 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
|
141 |
def generate_result():
|
142 |
-
subprocess.run(command)
|
143 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
|
145 |
|
146 |
def predict(m,historical=True):
|
|
|
133 |
os.remove('sample.csv')
|
134 |
|
135 |
|
136 |
+
command = [
|
137 |
+
'/path/to/java',
|
138 |
+
'--enable-preview',
|
139 |
+
'-jar',
|
140 |
+
'/jadbio-model-exe.jar',
|
141 |
+
'-m',
|
142 |
+
'/jadbio-1.4.119-model-Augustwithprice_feature0.bin',
|
143 |
+
'-i',
|
144 |
+
'/sample2.csv',
|
145 |
+
'-o',
|
146 |
+
'/predictions.csv'
|
147 |
+
]
|
148 |
|
149 |
def generate_result():
|
|
|
150 |
|
151 |
+
try:
|
152 |
+
subprocess.run(command)
|
153 |
+
except subprocess.CalledProcessError as e:
|
154 |
+
print(f"Command execution failed with error code {e.returncode}: {e.stderr}")
|
155 |
+
except Exception as e:
|
156 |
+
print(f"An unexpected error occurred: {str(e)}")
|
157 |
+
|
158 |
|
159 |
|
160 |
def predict(m,historical=True):
|