Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.44.1
metadata
title: Soil Resistivity Prediction
emoji: π
colorFrom: blue
colorTo: green
sdk: streamlit
sdk_version: 1.29.0
app_file: app.py
pinned: false
Resistivity Prediction App
This is a Streamlit web application for predicting resistivity based on input features. The app uses a trained deep learning model with attention mechanism and provides SHAP value explanations for predictions.
Setup Instructions
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
- Install required packages:
pip install -r requirements.txt
- Place the following files in the same directory:
model.pth
(trained model file)data.xlsx
(dataset file with features and target)
Running the App
To run the app, use the following command:
streamlit run app.py
The app will be available at http://localhost:8501 by default.
Usage
- Enter values for each feature using the input fields
- Click the "Predict" button
- View the prediction result and SHAP value explanation
Files Description
app.py
: Main Streamlit application filepredict.py
: Contains model architecture and prediction functionsrequirements.txt
: List of required Python packagesmodel.pth
: Trained model weights (not included, must be added)data.xlsx
: Dataset file (not included, must be added)
Model Architecture
The model uses a TabularTransformer architecture with:
- Feature embedding layer
- Multi-head attention mechanism
- Fully connected layers for prediction
Requirements
- Python 3.8+
- Required packages listed in requirements.txt