Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -133,12 +133,19 @@ def changedatashape():
|
|
133 |
os.remove('sample.csv')
|
134 |
|
135 |
|
136 |
-
|
|
|
|
|
|
|
137 |
|
138 |
def generate_result():
|
139 |
-
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
142 |
|
143 |
|
144 |
def predict(m,historical=True):
|
@@ -185,4 +192,8 @@ if st.button("Predict result"):
|
|
185 |
if 0.5<predi.iloc[0,1]<0.63:
|
186 |
st.write("increase")
|
187 |
else:
|
188 |
-
st.write("decrease")
|
|
|
|
|
|
|
|
|
|
133 |
os.remove('sample.csv')
|
134 |
|
135 |
|
136 |
+
jpype.startJVM(jpype.getDefaultJVMPath())
|
137 |
+
|
138 |
+
|
139 |
+
|
140 |
|
141 |
def generate_result():
|
142 |
+
# Define your Java command as a string
|
143 |
+
java_command = "java -version"
|
144 |
+
|
145 |
+
# Run the Java command in a subprocess
|
146 |
+
jpype.runScript(java_command)
|
147 |
+
|
148 |
+
|
149 |
|
150 |
|
151 |
def predict(m,historical=True):
|
|
|
192 |
if 0.5<predi.iloc[0,1]<0.63:
|
193 |
st.write("increase")
|
194 |
else:
|
195 |
+
st.write("decrease")
|
196 |
+
|
197 |
+
|
198 |
+
# Shutdown the JVM when you're done
|
199 |
+
jpype.shutdownJVM()
|