LoocasGoose commited on
Commit
86ddb54
·
1 Parent(s): e0b237c

better export title

Browse files
protein_conformal/backend/gradio_interface.py CHANGED
@@ -875,7 +875,15 @@ def export_current_results(format_type: str) -> Tuple[Dict[str, Any], Optional[s
875
  # Create a unique filename
876
  from datetime import datetime
877
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
878
- file_path = os.path.join("exported_reports", f"results_{timestamp}.{format_type}")
 
 
 
 
 
 
 
 
879
 
880
  # Export the results
881
  if format_type == "csv":
 
875
  # Create a unique filename
876
  from datetime import datetime
877
  timestamp = datetime.now().strftime("%Y%m%d_%H%M%S")
878
+ risk_type = (CURRENT_SESSION.get("parameters", {}).get("risk_type") or "risk").lower()
879
+ threshold = CURRENT_SESSION.get("results", {}).get("threshold")
880
+ threshold_tag = "thr_unknown"
881
+ if isinstance(threshold, (int, float)):
882
+ threshold_tag = f"thr_{threshold:.4f}".replace(".", "p")
883
+ file_path = os.path.join(
884
+ "exported_reports",
885
+ f"results_{timestamp}_{risk_type}_{threshold_tag}.{format_type}",
886
+ )
887
 
888
  # Export the results
889
  if format_type == "csv":