Skip to content

Commit bf1af30

Browse files
committed
.
1 parent 9c6eaaa commit bf1af30

11 files changed

Lines changed: 78 additions & 1387 deletions

File tree

.DS_Store

0 Bytes
Binary file not shown.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
2-
""" Input: trained model, X_test[0] (from UI), build_feature.py, predict_model.py
2+
""" It is a Streamlit web app for users.
3+
Input: trained model, X_test[0] (from UI), build_feature.py, predict_model.py
34
Output: y_test[0]"""
45

56
import joblib
@@ -10,7 +11,7 @@
1011
import streamlit as st
1112

1213
# import model
13-
model = joblib.load('../models/model_BIMReTA.pkl')
14+
model = joblib.load('models/model_BIMReTA.pkl')
1415

1516

1617
def rank_response_technologies(dispersion, E_ss, E_sl, E_sw, sufficient_mixing_energy,

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.11
2+
COPY . /docker_app
3+
WORKDIR /docker_app
4+
RUN pip install -r requirement.txt
5+
# RUN mkdir ~/.streamlit
6+
# RUN cp config.toml ~/config.toml
7+
# RUN cp credentials.toml ~/credentials.toml
8+
EXPOSE $PORT
9+
ENTRYPOINT ["streamlit", "run"]
10+
CMD ["BIMReTA_app.py"]

config.toml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[global]
2+
# If True, will show a warning when you run a Streamlit-enabled script via "python my_script.py".
3+
# Default: true
4+
showWarningOnDirectExecution = true
5+
6+
[logger]
7+
# Level of logging: 'error', 'warning', 'info', or 'debug'.
8+
# Default: 'info'
9+
level = "debug"
10+
11+
12+
13+
[runner]
14+
# Allows you to type a variable or string by itself in a single line of Python code to write it to the app.
15+
# Default: true
16+
magicEnabled = true
17+
18+
19+
20+
[server]
21+
# List of folders that should not be watched for changes. Relative paths will be taken as relative to the current working directory.
22+
# Example: ['/home/user1/env', 'relative/path/to/folder']
23+
# Default: []
24+
folderWatchBlacklist = ['']
25+
26+
# If false, will attempt to open a browser window on start.
27+
# Default: false unless (1) we are on a Linux box where DISPLAY is unset, or (2) server.liveSave is set.
28+
headless = true
29+
30+
# Immediately share the app in such a way that enables live monitoring, and post-run analysis.
31+
# Default: false
32+
liveSave = false
33+
34+
# Automatically rerun script when the file is modified on disk.
35+
# Default: false
36+
runOnSave = false
37+
38+
# The port where the server will listen for client and browser connections.
39+
# Default: 8501
40+
port = 80
41+
42+
# Enables support for Cross-Origin Request Sharing, for added security.
43+
# Default: true
44+
enableCORS = false
45+
46+
[browser]
47+
# Internet address of the server that the browser should connect to. Can be IP address or DNS name.
48+
# Default: 'localhost'
49+
serverAddress = "0.0.0.0"
50+
51+
# Whether to send usage statistics to Streamlit.
52+
# Default: true
53+
gatherUsageStats = true
54+
55+
# Port that the browser should use to connect to the server when in liveSave mode.
56+
# Default: whatever value is set in server.port.
57+
serverPort = 80

data/processed/~$cleaned_data.xlsx

-165 Bytes
Binary file not shown.

notebooks/3.0-reduced-model.ipynb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
"from sklearn.compose import ColumnTransformer\n",
3737
"from sklearn.model_selection import train_test_split\n",
3838
"from sklearn.pipeline import Pipeline, FeatureUnion\n",
39-
"\n",
4039
"# Modeling\n",
4140
"from sklearn.naive_bayes import GaussianNB\n",
4241
"from sklearn.multiclass import OneVsRestClassifier\n",
@@ -45,10 +44,11 @@
4544
"%matplotlib inline\n",
4645
"from itertools import cycle\n",
4746
"import seaborn as sns\n",
48-
"\n",
4947
"# Performance metrics\n",
5048
"from sklearn import metrics\n",
51-
"import joblib"
49+
"import joblib\n",
50+
"\n",
51+
"# pip install pipreqs pipreqs>requirements.txt "
5252
]
5353
},
5454
{

requirement.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
joblib==1.2.0
2+
numpy==1.25.2
3+
pandas==2.0.3
4+
scikit_learn==1.2.2
5+
streamlit==1.32.2

requirements.txt

Whitespace-only changes.

untitled folder/.DS_Store

-6 KB
Binary file not shown.

0 commit comments

Comments
 (0)