Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -39,6 +39,7 @@ if st.button("Predict", type='primary'):
|
|
| 39 |
if response.status_code == 200:
|
| 40 |
result = response.json()
|
| 41 |
sales_prediction = result["prediction"] # Extract only the value
|
| 42 |
-
|
|
|
|
| 43 |
else:
|
| 44 |
st.error("Error in API request")
|
|
|
|
| 39 |
if response.status_code == 200:
|
| 40 |
result = response.json()
|
| 41 |
sales_prediction = result["prediction"] # Extract only the value
|
| 42 |
+
actual_sales_prediction = np.exp(sales_prediction)
|
| 43 |
+
st.write(f"The predicted sales is ${actual_sales_prediction:.2f}.")
|
| 44 |
else:
|
| 45 |
st.error("Error in API request")
|