Spaces:
Sleeping
Sleeping
Update pages/4_Fracture_Prediction.py
Browse files
pages/4_Fracture_Prediction.py
CHANGED
|
@@ -102,12 +102,12 @@ with info_site:
|
|
| 102 |
|
| 103 |
# Option 2: CSV from LAS Exploration
|
| 104 |
st.caption('## 1.2. CSV from LAS Exploration')
|
| 105 |
-
dir_path = '
|
| 106 |
csv_files = [filename for filename in os.listdir(dir_path) if filename.endswith('.csv')]
|
| 107 |
selected_csv_file= st.multiselect('Select a CSV file', csv_files, key = 'st.session_state.selected_well_multi')
|
| 108 |
if selected_csv_file: # Nếu người dùng đã chọn file CSV
|
| 109 |
# Đọc file csv được chọn vào DataFrame
|
| 110 |
-
file_path = '
|
| 111 |
wells_df_predict = pd.concat([pd.read_csv(file_path + f) for f in selected_csv_file])
|
| 112 |
# wells_df_predict = tweak_data_S(wells_df_predict)
|
| 113 |
else: # Nếu người dùng không chọn file CSV
|
|
@@ -134,13 +134,13 @@ with info_site:
|
|
| 134 |
os.remove(temp_file_path)
|
| 135 |
# Option 2: JSON from TRAINING SECTION
|
| 136 |
st.caption('## 2.2. JSON from TRANING SECTION')
|
| 137 |
-
dir_path = '
|
| 138 |
json_files = [filename for filename in os.listdir(dir_path) if filename.endswith('.json')]
|
| 139 |
selected_json_file= st.multiselect('Select a JSON file', json_files, key = 'st.session_state.selected_well_multi_JSON')
|
| 140 |
if selected_json_file: # Nếu người dùng đã chọn file json
|
| 141 |
# Đọc file json được chọn vào Booster
|
| 142 |
-
file_path = '
|
| 143 |
-
model_files = "/
|
| 144 |
model_best = lgb.Booster(model_file=model_files)
|
| 145 |
else: # Nếu người dùng không chọn file json
|
| 146 |
model_best = model_best_uploader
|
|
|
|
| 102 |
|
| 103 |
# Option 2: CSV from LAS Exploration
|
| 104 |
st.caption('## 1.2. CSV from LAS Exploration')
|
| 105 |
+
dir_path = 'data/merged/'
|
| 106 |
csv_files = [filename for filename in os.listdir(dir_path) if filename.endswith('.csv')]
|
| 107 |
selected_csv_file= st.multiselect('Select a CSV file', csv_files, key = 'st.session_state.selected_well_multi')
|
| 108 |
if selected_csv_file: # Nếu người dùng đã chọn file CSV
|
| 109 |
# Đọc file csv được chọn vào DataFrame
|
| 110 |
+
file_path = 'data/merged/'
|
| 111 |
wells_df_predict = pd.concat([pd.read_csv(file_path + f) for f in selected_csv_file])
|
| 112 |
# wells_df_predict = tweak_data_S(wells_df_predict)
|
| 113 |
else: # Nếu người dùng không chọn file CSV
|
|
|
|
| 134 |
os.remove(temp_file_path)
|
| 135 |
# Option 2: JSON from TRAINING SECTION
|
| 136 |
st.caption('## 2.2. JSON from TRANING SECTION')
|
| 137 |
+
dir_path = 'models/'
|
| 138 |
json_files = [filename for filename in os.listdir(dir_path) if filename.endswith('.json')]
|
| 139 |
selected_json_file= st.multiselect('Select a JSON file', json_files, key = 'st.session_state.selected_well_multi_JSON')
|
| 140 |
if selected_json_file: # Nếu người dùng đã chọn file json
|
| 141 |
# Đọc file json được chọn vào Booster
|
| 142 |
+
file_path = 'models/'
|
| 143 |
+
model_files = "/models/05_13_2023_11_50_38_model_LGBM.json"
|
| 144 |
model_best = lgb.Booster(model_file=model_files)
|
| 145 |
else: # Nếu người dùng không chọn file json
|
| 146 |
model_best = model_best_uploader
|