devjas1 commited on
Commit
7184c06
Β·
1 Parent(s): 0218933

(CONFIG:Naming)[Enhanced Analysis and Interactive Dashboard]:

Browse files

- No logic changes;
- Naming standardized

(CHORE)[Cleanup Old Refs]:
Update references to reflect "ML Polymer Aging" instead of "POLYMEROS" in various files

(CHORE)[UI]: Update label for `page-link-container` Inference Analysis Dashboard β†’ Interactive Batch Analysis Dashboard

pages/{Enhanced_Analysis.py β†’ 2_Enhanced_Analysis.py} RENAMED
@@ -1,3 +1,4 @@
 
1
  """
2
  Enhanced Analysis Page
3
  Advanced multi-modal spectroscopy analysis with modern ML architecture
@@ -10,8 +11,6 @@ import matplotlib.pyplot as plt
10
  from pathlib import Path
11
  import io
12
  from PIL import Image
13
-
14
- # Import POLYMEROS components
15
  import sys
16
  import os
17
 
@@ -71,12 +70,17 @@ def load_enhanced_model(model_name: str):
71
  return False
72
  except Exception as e:
73
  st.error(f"Error loading model: {e}")
 
 
 
 
 
74
  return False
75
 
76
 
77
  def render_enhanced_file_upload():
78
  """Render enhanced file upload with metadata extraction"""
79
- st.header("πŸ“ Enhanced Spectrum Analysis")
80
 
81
  uploaded_file = st.file_uploader(
82
  "Upload spectrum file (.txt)",
@@ -101,7 +105,7 @@ def render_enhanced_file_upload():
101
 
102
  # Get data quality assessment
103
  data_manager = st.session_state.data_manager
104
- quality_score = data_manager._assess_data_quality(y_data)
105
  spectrum.metadata.data_quality_score = quality_score
106
 
107
  # Display quality assessment
@@ -384,10 +388,10 @@ def render_data_provenance():
384
  def main():
385
  """Main enhanced analysis interface"""
386
  st.set_page_config(
387
- page_title="POLYMEROS Enhanced Analysis", page_icon="πŸ”¬", layout="wide"
388
  )
389
 
390
- st.title("πŸ”¬ POLYMEROS Enhanced Analysis")
391
  st.markdown("**Transparent AI with Explainability and Hypothesis Generation**")
392
 
393
  # Initialize session
 
1
+ # In 2_Enhanced_Analysis.py
2
  """
3
  Enhanced Analysis Page
4
  Advanced multi-modal spectroscopy analysis with modern ML architecture
 
11
  from pathlib import Path
12
  import io
13
  from PIL import Image
 
 
14
  import sys
15
  import os
16
 
 
70
  return False
71
  except Exception as e:
72
  st.error(f"Error loading model: {e}")
73
+ st.error("Please check the model name and ensure the model file is accessible.")
74
+ st.error("Detailed traceback has been logged for debugging.")
75
+ import traceback
76
+
77
+ traceback.print_exc()
78
  return False
79
 
80
 
81
  def render_enhanced_file_upload():
82
  """Render enhanced file upload with metadata extraction"""
83
+ st.subheader("Deeper Analysis on Spectrum with AI Insights")
84
 
85
  uploaded_file = st.file_uploader(
86
  "Upload spectrum file (.txt)",
 
105
 
106
  # Get data quality assessment
107
  data_manager = st.session_state.data_manager
108
+ quality_score = data_manager.assess_data_quality(y_data)
109
  spectrum.metadata.data_quality_score = quality_score
110
 
111
  # Display quality assessment
 
388
  def main():
389
  """Main enhanced analysis interface"""
390
  st.set_page_config(
391
+ page_title="ML Polymer Enhanced Analysis", page_icon="πŸ”¬", layout="wide"
392
  )
393
 
394
+ st.title("Enhanced Spectrum Analysis")
395
  st.markdown("**Transparent AI with Explainability and Hypothesis Generation**")
396
 
397
  # Initialize session
pages/{2_Dashboard.py β†’ 3_Interactive_Dashboard.py} RENAMED
@@ -1,4 +1,4 @@
1
- # In pages/2_Dashboard.py
2
 
3
  import streamlit as st
4
  from utils.results_manager import ResultsManager
 
1
+ # In 3_Interactive_Dashboard.py
2
 
3
  import streamlit as st
4
  from utils.results_manager import ResultsManager
test_new_features.py CHANGED
@@ -1,5 +1,5 @@
1
  """
2
- Test script to verify the new POLYMEROS features are working correctly
3
  """
4
 
5
  import numpy as np
@@ -157,7 +157,7 @@ def test_database_functionality():
157
 
158
  def main():
159
  """Run all tests"""
160
- print("πŸ§ͺ POLYMEROS Feature Validation Tests")
161
  print("=" * 50)
162
 
163
  tests = [
@@ -178,7 +178,7 @@ def main():
178
  print(f"🎯 Test Results: {passed}/{total} tests passed")
179
 
180
  if passed == total:
181
- print("πŸŽ‰ ALL TESTS PASSED - POLYMEROS features are working correctly!")
182
  print("\nβœ… Critical features validated:")
183
  print(" β€’ FTIR integration and multi-modal spectroscopy")
184
  print(" β€’ Modern ML architecture with transformers and ensembles")
 
1
  """
2
+ Test script to verify the new ML Polymer Aging features are working correctly
3
  """
4
 
5
  import numpy as np
 
157
 
158
  def main():
159
  """Run all tests"""
160
+ print("πŸ§ͺ ML Polymer Aging Feature Validation Tests")
161
  print("=" * 50)
162
 
163
  tests = [
 
178
  print(f"🎯 Test Results: {passed}/{total} tests passed")
179
 
180
  if passed == total:
181
+ print("πŸŽ‰ ALL TESTS PASSED - ML Polymer Aging features are working correctly!")
182
  print("\nβœ… Critical features validated:")
183
  print(" β€’ FTIR integration and multi-modal spectroscopy")
184
  print(" β€’ Modern ML architecture with transformers and ensembles")
tests/test_polymeros_omponents.py CHANGED
@@ -1,5 +1,5 @@
1
  """
2
- Test suite for POLYMEROS enhanced components
3
  """
4
 
5
  import sys
@@ -133,7 +133,7 @@ def test_educational_framework():
133
 
134
  def run_all_tests():
135
  """Run all component tests"""
136
- print("Starting POLYMEROS Component Tests...\n")
137
 
138
  tests = [
139
  test_enhanced_data_manager,
@@ -153,7 +153,7 @@ def run_all_tests():
153
  print(f"Tests completed: {passed}/{len(tests)} passed")
154
 
155
  if passed == len(tests):
156
- print("πŸŽ‰ All POLYMEROS components working correctly!")
157
  else:
158
  print("⚠️ Some components need attention")
159
 
 
1
  """
2
+ Test suite for ML Polymer Aging enhanced components
3
  """
4
 
5
  import sys
 
133
 
134
  def run_all_tests():
135
  """Run all component tests"""
136
+ print("Starting ML Polymer Aging Component Tests...\n")
137
 
138
  tests = [
139
  test_enhanced_data_manager,
 
153
  print(f"Tests completed: {passed}/{len(tests)} passed")
154
 
155
  if passed == len(tests):
156
+ print("πŸŽ‰ All ML Polymer Aging components working correctly!")
157
  else:
158
  print("⚠️ Some components need attention")
159
 
utils/results_manager.py CHANGED
@@ -505,8 +505,8 @@ class ResultsManager:
505
  st.dataframe(df, use_container_width=True)
506
  with st.container(border=None, key="page-link-container"):
507
  st.page_link(
508
- "pages/2_Dashboard.py",
509
- label="Inference Analysis Dashboard",
510
  help="Dive deeper into your batch results.",
511
  use_container_width=False,
512
  )
 
505
  st.dataframe(df, use_container_width=True)
506
  with st.container(border=None, key="page-link-container"):
507
  st.page_link(
508
+ "pages/3_Interactive_Dashboard.py",
509
+ label="Interactive Batch Analysis Dashboard",
510
  help="Dive deeper into your batch results.",
511
  use_container_width=False,
512
  )
validate_features.py CHANGED
@@ -1,5 +1,5 @@
1
  """
2
- Simple validation test to verify POLYMEROS modules can be imported
3
  """
4
 
5
  import sys
@@ -11,7 +11,7 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)))
11
 
12
  def test_imports():
13
  """Test that all new modules can be imported successfully"""
14
- print("πŸ§ͺ POLYMEROS Module Import Validation")
15
  print("=" * 50)
16
 
17
  modules_to_test = [
@@ -37,7 +37,7 @@ def test_imports():
37
 
38
  if passed == total:
39
  print("πŸŽ‰ ALL MODULES IMPORTED SUCCESSFULLY!")
40
- print("\nβœ… Critical POLYMEROS features are ready:")
41
  print(" β€’ Advanced Spectroscopy Integration (FTIR + Raman)")
42
  print(" β€’ Modern ML Architecture (Transformers + Ensembles)")
43
  print(" β€’ Enhanced Data Pipeline (Quality Control + Synthesis)")
@@ -111,7 +111,7 @@ def main():
111
 
112
  print("\n" + "=" * 50)
113
  if import_success and class_success:
114
- print("πŸŽ‰ POLYMEROS VALIDATION SUCCESSFUL!")
115
  print("\nπŸš€ All critical features implemented and ready:")
116
  print(" βœ… FTIR integration (non-negotiable requirement)")
117
  print(" βœ… Multi-model implementation (non-negotiable requirement)")
 
1
  """
2
+ Simple validation test to verify ML Polymer Aging modules can be imported
3
  """
4
 
5
  import sys
 
11
 
12
  def test_imports():
13
  """Test that all new modules can be imported successfully"""
14
+ print("πŸ§ͺ ML Polymer Aging Module Import Validation")
15
  print("=" * 50)
16
 
17
  modules_to_test = [
 
37
 
38
  if passed == total:
39
  print("πŸŽ‰ ALL MODULES IMPORTED SUCCESSFULLY!")
40
+ print("\nβœ… Critical ML Polymer Aging features are ready:")
41
  print(" β€’ Advanced Spectroscopy Integration (FTIR + Raman)")
42
  print(" β€’ Modern ML Architecture (Transformers + Ensembles)")
43
  print(" β€’ Enhanced Data Pipeline (Quality Control + Synthesis)")
 
111
 
112
  print("\n" + "=" * 50)
113
  if import_success and class_success:
114
+ print("πŸŽ‰ ML Polymer Aging VALIDATION SUCCESSFUL!")
115
  print("\nπŸš€ All critical features implemented and ready:")
116
  print(" βœ… FTIR integration (non-negotiable requirement)")
117
  print(" βœ… Multi-model implementation (non-negotiable requirement)")