FastAPI app that parses CMM inspection reports (PDF/Excel/CSV), computes SPC metrics (Cp/Cpk/Pp/Ppk, control limits, Shapiro-Wilk), generates interactive Plotly charts, and provides AI-powered quality summaries via Azure OpenAI with graceful fallback. Includes 21 passing tests covering parsers, SPC calculations, and API endpoints.
50 lines
1.6 KiB
HTML
50 lines
1.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>CMM Report Analyzer</title>
|
|
<link rel="stylesheet" href="/css/style.css">
|
|
<script src="https://cdn.plot.ly/plotly-2.35.0.min.js"></script>
|
|
</head>
|
|
<body>
|
|
<header>
|
|
<h1>CMM Report Analyzer</h1>
|
|
<p class="subtitle">Upload CMM inspection reports for SPC analysis and AI-powered summaries</p>
|
|
</header>
|
|
|
|
<main>
|
|
<!-- Upload area -->
|
|
<section id="upload-section">
|
|
<div id="drop-zone">
|
|
<div class="drop-content">
|
|
<svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
|
|
<path d="M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4"/>
|
|
<polyline points="17 8 12 3 7 8"/>
|
|
<line x1="12" y1="3" x2="12" y2="15"/>
|
|
</svg>
|
|
<p>Drag & drop PDF or Excel files here</p>
|
|
<p class="hint">or click to browse — .pdf, .xlsx, .xls, .csv</p>
|
|
</div>
|
|
<input type="file" id="file-input" multiple accept=".pdf,.xlsx,.xls,.csv" hidden>
|
|
</div>
|
|
<div id="file-list"></div>
|
|
<button id="upload-btn" disabled>Analyze Files</button>
|
|
</section>
|
|
|
|
<!-- Status -->
|
|
<section id="status-section" hidden>
|
|
<div class="spinner"></div>
|
|
<p id="status-text">Processing files...</p>
|
|
</section>
|
|
|
|
<!-- Results -->
|
|
<section id="results-section" hidden>
|
|
<div id="results-container"></div>
|
|
</section>
|
|
</main>
|
|
|
|
<script src="/js/app.js"></script>
|
|
</body>
|
|
</html>
|