Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,24 +29,9 @@ if submit_button:
|
|
| 29 |
|
| 30 |
# Display results
|
| 31 |
st.success(f"Prediction complete!")
|
| 32 |
-
st.write(f"Email: {email}")
|
| 33 |
st.write(f"Prediction: {prediction}")
|
| 34 |
|
| 35 |
-
# Add API documentation section
|
| 36 |
-
st.markdown("---")
|
| 37 |
-
st.subheader("API Documentation")
|
| 38 |
-
st.write("This app also provides an API endpoint for predictions.")
|
| 39 |
-
st.code("""
|
| 40 |
-
# Example API request using Python
|
| 41 |
-
import requests
|
| 42 |
-
|
| 43 |
-
response = requests.post(
|
| 44 |
-
"https://your-app-url/api/predict",
|
| 45 |
-
json={"email": "example@example.com"}
|
| 46 |
-
)
|
| 47 |
-
result = response.json()
|
| 48 |
-
""")
|
| 49 |
-
|
| 50 |
# Footer
|
| 51 |
st.markdown("---")
|
| 52 |
st.markdown("Created with Streamlit")
|
|
|
|
| 29 |
|
| 30 |
# Display results
|
| 31 |
st.success(f"Prediction complete!")
|
| 32 |
+
st.write(f"Email Body: {email}")
|
| 33 |
st.write(f"Prediction: {prediction}")
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Footer
|
| 36 |
st.markdown("---")
|
| 37 |
st.markdown("Created with Streamlit")
|