improve layout
Browse files- src/App.tsx +2 -3
- src/Footer.tsx +2 -2
- src/Header.tsx +3 -3
- src/components/pipelines/FeatureExtraction.tsx +1 -1
- src/components/pipelines/ImageClassification.tsx +1 -1
- src/components/pipelines/TextClassification.tsx +1 -1
- src/components/pipelines/TextGeneration.tsx +1 -1
- src/components/pipelines/ZeroShotClassification.tsx +1 -1
src/App.tsx
CHANGED
@@ -39,11 +39,10 @@ function App() {
|
|
39 |
}, [setModels, setModelInfo, setIsFetching, pipeline])
|
40 |
|
41 |
return (
|
42 |
-
<div className="relative min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
|
43 |
<Header />
|
44 |
<PipelineLayout>
|
45 |
-
<div className=" flex h-[calc(100vh-
|
46 |
-
{/* Header is h-16 = 4rem */}
|
47 |
{/* Main Content */}
|
48 |
<main className="flex-1 overflow-auto">
|
49 |
<div className="h-full px-4 sm:px-6 lg:px-8 py-2 lg:pr-4 max-w-none">
|
|
|
39 |
}, [setModels, setModelInfo, setIsFetching, pipeline])
|
40 |
|
41 |
return (
|
42 |
+
<div className="relative min-h-screen flex flex-col bg-gradient-to-br from-blue-50 to-indigo-100">
|
43 |
<Header />
|
44 |
<PipelineLayout>
|
45 |
+
<div className=" flex h-[calc(100vh-6.6rem)]">
|
|
|
46 |
{/* Main Content */}
|
47 |
<main className="flex-1 overflow-auto">
|
48 |
<div className="h-full px-4 sm:px-6 lg:px-8 py-2 lg:pr-4 max-w-none">
|
src/Footer.tsx
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
function Footer() {
|
2 |
return (
|
3 |
-
<footer className="bg-white w-full">
|
4 |
-
<div className="max-w-7xl flex flex-col items-center justify-center text-center px-4 sm:px-6 lg:px-8 py-4 mx-auto h-
|
5 |
<div className="flex flex-row items-center space-x-2 text-sm text-gray-500">
|
6 |
{/*<a
|
7 |
href="https://vnavarro.dev"
|
|
|
1 |
function Footer() {
|
2 |
return (
|
3 |
+
<footer className="bg-white w-full mt-auto">
|
4 |
+
<div className="max-w-7xl flex flex-col items-center justify-center text-center px-4 sm:px-6 lg:px-8 py-4 mx-auto h-10">
|
5 |
<div className="flex flex-row items-center space-x-2 text-sm text-gray-500">
|
6 |
{/*<a
|
7 |
href="https://vnavarro.dev"
|
src/Header.tsx
CHANGED
@@ -2,20 +2,20 @@ function Header() {
|
|
2 |
return (
|
3 |
<header className="bg-white shadow-xs border-b">
|
4 |
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
5 |
-
<div className="flex items-center justify-center h-16">
|
6 |
<div className="flex items-center space-x-3">
|
7 |
<div className="w-12 h-12 flex items-center justify-center">
|
8 |
<img
|
9 |
src="/hf-logo.svg"
|
10 |
alt="Hugging Face"
|
11 |
-
className="w-12 h-12"
|
12 |
/>
|
13 |
</div>
|
14 |
<div>
|
15 |
<h1 className="text-xl font-bold text-gray-900">
|
16 |
Transformers.js Playground
|
17 |
</h1>
|
18 |
-
<p className="text-sm text-gray-500">
|
19 |
Run Hugging Face models in your browser
|
20 |
</p>
|
21 |
</div>
|
|
|
2 |
return (
|
3 |
<header className="bg-white shadow-xs border-b">
|
4 |
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
5 |
+
<div className="flex items-center justify-center h-10 lg:h-16">
|
6 |
<div className="flex items-center space-x-3">
|
7 |
<div className="w-12 h-12 flex items-center justify-center">
|
8 |
<img
|
9 |
src="/hf-logo.svg"
|
10 |
alt="Hugging Face"
|
11 |
+
className="w-10 h-10 lg:w-12 lg:h-12"
|
12 |
/>
|
13 |
</div>
|
14 |
<div>
|
15 |
<h1 className="text-xl font-bold text-gray-900">
|
16 |
Transformers.js Playground
|
17 |
</h1>
|
18 |
+
<p className="text-sm text-gray-500 hidden lg:block">
|
19 |
Run Hugging Face models in your browser
|
20 |
</p>
|
21 |
</div>
|
src/components/pipelines/FeatureExtraction.tsx
CHANGED
@@ -258,7 +258,7 @@ function FeatureExtraction() {
|
|
258 |
const busy = status !== 'ready' || isExtracting
|
259 |
|
260 |
return (
|
261 |
-
<div className="flex flex-col max-h-[calc(100dvh-
|
262 |
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-4 gap-2">
|
263 |
<h1 className="text-xl sm:text-2xl font-bold">
|
264 |
Feature Extraction (Embeddings)
|
|
|
258 |
const busy = status !== 'ready' || isExtracting
|
259 |
|
260 |
return (
|
261 |
+
<div className="flex flex-col max-h-[calc(100dvh-128px)] w-full p-4">
|
262 |
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between mb-4 gap-2">
|
263 |
<h1 className="text-xl sm:text-2xl font-bold">
|
264 |
Feature Extraction (Embeddings)
|
src/components/pipelines/ImageClassification.tsx
CHANGED
@@ -184,7 +184,7 @@ function ImageClassification() {
|
|
184 |
const busy = status !== 'ready' || isClassifying
|
185 |
|
186 |
return (
|
187 |
-
<div className="flex flex-col h-full max-h-[calc(100dvh-
|
188 |
<div className="flex items-center justify-between mb-4">
|
189 |
<h1 className="text-2xl font-bold">Image Classification</h1>
|
190 |
<div className="flex gap-2">
|
|
|
184 |
const busy = status !== 'ready' || isClassifying
|
185 |
|
186 |
return (
|
187 |
+
<div className="flex flex-col h-full max-h-[calc(100dvh-128px)] w-full p-4">
|
188 |
<div className="flex items-center justify-between mb-4">
|
189 |
<h1 className="text-2xl font-bold">Image Classification</h1>
|
190 |
<div className="flex gap-2">
|
src/components/pipelines/TextClassification.tsx
CHANGED
@@ -87,7 +87,7 @@ function TextClassification() {
|
|
87 |
}
|
88 |
|
89 |
return (
|
90 |
-
<div className="flex flex-col h-full max-h-[calc(100dvh-
|
91 |
<h1 className="text-2xl font-bold mb-4 shrink-0">Text Classification</h1>
|
92 |
|
93 |
<div className="flex flex-col lg:flex-row gap-4 flex-1 min-h-0 overflow-hidden">
|
|
|
87 |
}
|
88 |
|
89 |
return (
|
90 |
+
<div className="flex flex-col h-full max-h-[calc(100dvh-128px)] w-full p-4">
|
91 |
<h1 className="text-2xl font-bold mb-4 shrink-0">Text Classification</h1>
|
92 |
|
93 |
<div className="flex flex-col lg:flex-row gap-4 flex-1 min-h-0 overflow-hidden">
|
src/components/pipelines/TextGeneration.tsx
CHANGED
@@ -145,7 +145,7 @@ function TextGeneration() {
|
|
145 |
const hasChatTemplate = modelInfo?.hasChatTemplate
|
146 |
|
147 |
return (
|
148 |
-
<div className="flex flex-col min-h-[30dvh] max-h-[calc(100dvh-
|
149 |
<div className="flex items-center justify-between mb-4">
|
150 |
<h1 className="text-2xl font-bold">
|
151 |
Text Generation {hasChatTemplate ? '(Chat)' : ''}
|
|
|
145 |
const hasChatTemplate = modelInfo?.hasChatTemplate
|
146 |
|
147 |
return (
|
148 |
+
<div className="flex flex-col min-h-[30dvh] max-h-[calc(100dvh-128px)] w-full p-4">
|
149 |
<div className="flex items-center justify-between mb-4">
|
150 |
<h1 className="text-2xl font-bold">
|
151 |
Text Generation {hasChatTemplate ? '(Chat)' : ''}
|
src/components/pipelines/ZeroShotClassification.tsx
CHANGED
@@ -81,7 +81,7 @@ function ZeroShotClassification() {
|
|
81 |
const busy: boolean = status !== 'ready'
|
82 |
|
83 |
return (
|
84 |
-
<div className="flex flex-col h-full max-h-[calc(100dvh-
|
85 |
<div className="flex items-center justify-between mb-4">
|
86 |
<h1 className="text-2xl font-bold">Zero-Shot Classification</h1>
|
87 |
</div>
|
|
|
81 |
const busy: boolean = status !== 'ready'
|
82 |
|
83 |
return (
|
84 |
+
<div className="flex flex-col h-full max-h-[calc(100dvh-128px)] w-full p-4">
|
85 |
<div className="flex items-center justify-between mb-4">
|
86 |
<h1 className="text-2xl font-bold">Zero-Shot Classification</h1>
|
87 |
</div>
|