-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
132 lines (130 loc) · 6.33 KB
/
index.html
File metadata and controls
132 lines (130 loc) · 6.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>spaCy Text Cleaning API</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="https://unpkg.com/swagger-ui-dist@5/swagger-ui.css" />
<style>
:root { color-scheme: light dark; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; padding: 0; background: #0b1020; color: #e6edf3; }
a { color: #7cc7ff; }
header {
padding: 36px 20px 30px;
background: radial-gradient(1200px 600px at 10% -20%, rgba(56,139,253,.25), transparent 60%),
radial-gradient(800px 400px at 90% -20%, rgba(172,105,248,.22), transparent 55%),
linear-gradient(180deg, #0d1117 0%, #0b1020 100%);
border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}
.container { max-width: 1140px; margin: 0 auto; }
h1 { margin: 0 0 8px; font-size: 30px; letter-spacing: 0.2px; color: #ffffff; }
p.sub { margin: 0; opacity: .9; }
main { max-width: 1140px; margin: 0 auto; padding: 26px 20px 40px; }
.grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.card { background: rgba(2, 6, 23, 0.6); border: 1px solid rgba(148,163,184,0.18); border-radius: 12px; padding: 16px 16px; backdrop-filter: blur(4px); }
.card h2 { margin: 0 0 10px; font-size: 18px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
@media (min-width: 880px) { .grid { grid-template-columns: 1fr 1fr; } }
/* Swagger section */
.swagger-wrap { margin-top: 22px; }
#swagger-ui { background: #0f172a; border: 1px solid rgba(148,163,184,0.18); border-radius: 12px; padding-top: 10px; }
/* Improve contrast for dark backgrounds */
.swagger-ui .opblock-summary-method { color: #111827; }
.swagger-ui .opblock.opblock-post { border-color: #49cc90; background: rgba(73,204,144,.07); }
.swagger-ui .opblock.opblock-get { border-color: #61affe; background: rgba(97,175,254,.07); }
.swagger-ui .opblock.opblock-put { border-color: #fca130; background: rgba(252,161,48,.07); }
.swagger-ui .opblock.opblock-delete { border-color: #f93e3e; background: rgba(249,62,62,.07); }
/* Ensure the very top of the docs is never clipped */
.swagger-ui .topbar { display: none; }
.swagger-ui .info { margin-top: 0 !important; padding-top: 8px; }
.swagger-ui .info h1, .swagger-ui .info h2, .swagger-ui .opblock-tag { color: #ffffff !important; }
/* Dark header for opblock sections so white text is readable */
.swagger-ui .opblock-section-header {
background: #1f2937 !important; /* dark grey */
border-color: rgba(148,163,184,0.25) !important;
}
.swagger-ui .opblock-section-header h4 { color: #ffffff !important; }
.swagger-ui .opblock-section-header button, .swagger-ui .opblock-section-header a { color: #ffffff !important; }
.swagger-ui .opblock-section-header svg { fill: #ffffff !important; stroke: #ffffff !important; }
/* Force white/light text throughout docs */
.swagger-ui, .swagger-ui .info, .swagger-ui .wrapper,
.swagger-ui .markdown, .swagger-ui .model, .swagger-ui .model-title,
.swagger-ui .opblock, .swagger-ui .opblock-summary-description,
.swagger-ui .parameter__name, .swagger-ui .parameter__type,
.swagger-ui .parameter__in, .swagger-ui .response-col_description,
.swagger-ui .responses-inner, .swagger-ui table, .swagger-ui td, .swagger-ui th,
.swagger-ui .tab li, .swagger-ui .opblock-section-header h4,
.swagger-ui .model-title__text, .swagger-ui .property-row .prop-name,
.swagger-ui .prop-type, .swagger-ui .prop-format, .swagger-ui .microlight,
.swagger-ui .renderedMarkdown p, .swagger-ui .renderedMarkdown li,
.swagger-ui .opblock-summary-path { color: #ffffff !important; }
.swagger-ui a { color: #93c5fd !important; }
/* Code blocks and JSON samples */
.swagger-ui .highlight-code, .swagger-ui .microlight { background: #0b1020 !important; color: #ffffff !important; }
/* Tables */
.swagger-ui table thead tr th { background: rgba(148,163,184,0.10) !important; }
.swagger-ui table tr { border-color: rgba(148,163,184,0.25) !important; }
/* Inputs */
.swagger-ui input[type=text], .swagger-ui textarea, .swagger-ui select {
background: #0b1020 !important;
color: #ffffff !important;
border: 1px solid rgba(148,163,184,0.28) !important;
}
.swagger-ui ::placeholder { color: #9aa4b2 !important; }
</style>
</head>
<body>
<header>
<div class="container">
<h1>spaCy Text Cleaning API</h1>
<p class="sub">FastAPI service for cleaning and tokenizing text with spaCy — interactive docs below.</p>
</div>
</header>
<main>
<div class="grid">
<section class="card">
<h2>About</h2>
<p>
This service uses <a href="https://spacy.io" target="_blank" rel="noreferrer">spaCy</a> to preprocess text.
It loads the <span class="mono">en_core_web_sm</span> model and performs:
</p>
<ul>
<li>Lowercasing and punctuation removal</li>
<li>spaCy tokenization</li>
<li>Stopword filtering</li>
</ul>
</section>
<section class="card">
<h2>Quick usage</h2>
<ol>
<li>Use the Swagger UI below to try endpoints interactively.</li>
<li>Programmatically, POST JSON like <code>{"text":"The quick brown fox..."}</code> to <code>/api/remove_stopwords</code>.</li>
</ol>
<p>Primary endpoint: <code>/api/remove_stopwords</code></p>
</section>
</div>
<div class="swagger-wrap">
<div id="swagger-ui"></div>
</div>
</main>
<script src="https://unpkg.com/swagger-ui-dist@5/swagger-ui-bundle.js" crossorigin></script>
<script>
window.addEventListener('DOMContentLoaded', () => {
SwaggerUIBundle({
url: '/openapi.json',
dom_id: '#swagger-ui',
deepLinking: true,
docExpansion: 'none',
defaultModelsExpandDepth: 0,
presets: [SwaggerUIBundle.presets.apis],
layout: 'BaseLayout'
});
});
</script>
</body>
</html>