Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -273,11 +273,13 @@ elif page == "Price Prediction":
|
|
| 273 |
lstm_price = lstm_model.predict(input_scaled.reshape(1, 1, -1))[0][0]
|
| 274 |
transformer_price = transformer_model.predict(input_scaled.reshape(1, 1, -1))[0][0]
|
| 275 |
rl_price = rl_model.predict(input_with_step)[0]
|
|
|
|
|
|
|
| 276 |
|
| 277 |
# Display results
|
| 278 |
st.success(f"LSTM Predicted Price: ${lstm_price:.2f}")
|
| 279 |
st.success(f"Transformer Predicted Price: ${transformer_price:.2f}")
|
| 280 |
-
st.success(f"RL Predicted Price: ${
|
| 281 |
|
| 282 |
st.subheader("LLM Pricing Analysis:")
|
| 283 |
st.write(llm_analysis)
|
|
|
|
| 273 |
lstm_price = lstm_model.predict(input_scaled.reshape(1, 1, -1))[0][0]
|
| 274 |
transformer_price = transformer_model.predict(input_scaled.reshape(1, 1, -1))[0][0]
|
| 275 |
rl_price = rl_model.predict(input_with_step)[0]
|
| 276 |
+
# Extract the single float value from the RL prediction
|
| 277 |
+
rl_price_value = rl_price.item() if isinstance(rl_price, np.ndarray) else rl_price
|
| 278 |
|
| 279 |
# Display results
|
| 280 |
st.success(f"LSTM Predicted Price: ${lstm_price:.2f}")
|
| 281 |
st.success(f"Transformer Predicted Price: ${transformer_price:.2f}")
|
| 282 |
+
st.success(f"RL Predicted Price: ${rl_price_value:.2f}")
|
| 283 |
|
| 284 |
st.subheader("LLM Pricing Analysis:")
|
| 285 |
st.write(llm_analysis)
|