modified app file with new headers
Browse files
app.py
CHANGED
|
@@ -39,9 +39,12 @@ st.subheader('The Closing price vs Time Chart with MA')
|
|
| 39 |
ma100 = df.Close.rolling(100).mean()
|
| 40 |
ma200 = df.Close.rolling(200).mean()
|
| 41 |
fig = plt.figure(figsize=(12,6))
|
| 42 |
-
plt.plot(df.Close,'b')
|
| 43 |
-
plt.plot(ma100,'r')
|
| 44 |
-
plt.plot(ma200,'g')
|
|
|
|
|
|
|
|
|
|
| 45 |
st.pyplot(fig)
|
| 46 |
|
| 47 |
# train-test split
|
|
@@ -84,7 +87,7 @@ y_pred = y_pred*scale_factor
|
|
| 84 |
y_test = y_test*scale_factor
|
| 85 |
|
| 86 |
#plotting
|
| 87 |
-
st.subheader("Trends vs Original Prie")
|
| 88 |
fig2 = plt.figure(figsize=(12,6))
|
| 89 |
plt.plot(y_test,'b',label='Original Price')
|
| 90 |
plt.plot(y_pred,'r',label='Predicted Price')
|
|
|
|
| 39 |
ma100 = df.Close.rolling(100).mean()
|
| 40 |
ma200 = df.Close.rolling(200).mean()
|
| 41 |
fig = plt.figure(figsize=(12,6))
|
| 42 |
+
plt.plot(df.Close,'b',label='Original Price')
|
| 43 |
+
plt.plot(ma100,'r',label='MA100')
|
| 44 |
+
plt.plot(ma200,'g',label='MA200')
|
| 45 |
+
plt.xlabel('Time')
|
| 46 |
+
plt.ylabel('Price')
|
| 47 |
+
plt.legend()
|
| 48 |
st.pyplot(fig)
|
| 49 |
|
| 50 |
# train-test split
|
|
|
|
| 87 |
y_test = y_test*scale_factor
|
| 88 |
|
| 89 |
#plotting
|
| 90 |
+
st.subheader("Forecasted Trends vs Original Prie")
|
| 91 |
fig2 = plt.figure(figsize=(12,6))
|
| 92 |
plt.plot(y_test,'b',label='Original Price')
|
| 93 |
plt.plot(y_pred,'r',label='Predicted Price')
|