Spaces:
Sleeping
Sleeping
File size: 1,669 Bytes
a74f3cd 778f96f a74f3cd 778f96f a74f3cd 778f96f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
---
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
1. Create a virtual environment (recommended):
```bash
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
```
2. Install required packages:
```bash
pip install -r requirements.txt
```
3. 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:
```bash
streamlit run app.py
```
The app will be available at http://localhost:8501 by default.
## Usage
1. Enter values for each feature using the input fields
2. Click the "Predict" button
3. View the prediction result and SHAP value explanation
## Files Description
- `app.py`: Main Streamlit application file
- `predict.py`: Contains model architecture and prediction functions
- `requirements.txt`: List of required Python packages
- `model.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 |