Vokturz commited on
Commit
f7c4172
·
1 Parent(s): e19d3ef

add footer and fix layout

Browse files
src/App.tsx CHANGED
@@ -11,6 +11,7 @@ import ImageClassification from './components/pipelines/ImageClassification'
11
  import Sidebar from './components/Sidebar'
12
  import ModelReadme from './components/ModelReadme'
13
  import { PipelineLayout } from './components/PipelineLayout'
 
14
 
15
  function App() {
16
  const [isSidebarOpen, setIsSidebarOpen] = useState(false)
@@ -39,7 +40,7 @@ function App() {
39
  <div className="relative min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
40
  <Header />
41
  <PipelineLayout>
42
- <div className=" flex h-[calc(100vh-4rem)]">
43
  {/* Header is h-16 = 4rem */}
44
  {/* Main Content */}
45
  <main className="flex-1 overflow-auto">
@@ -76,6 +77,7 @@ function App() {
76
  />
77
  </div>
78
  </PipelineLayout>
 
79
  {modelInfo?.readme && (
80
  <ModelReadme
81
  readme={modelInfo.readme}
 
11
  import Sidebar from './components/Sidebar'
12
  import ModelReadme from './components/ModelReadme'
13
  import { PipelineLayout } from './components/PipelineLayout'
14
+ import Footer from './Footer'
15
 
16
  function App() {
17
  const [isSidebarOpen, setIsSidebarOpen] = useState(false)
 
40
  <div className="relative min-h-screen bg-gradient-to-br from-blue-50 to-indigo-100">
41
  <Header />
42
  <PipelineLayout>
43
+ <div className=" flex h-[calc(100vh-8rem)]">
44
  {/* Header is h-16 = 4rem */}
45
  {/* Main Content */}
46
  <main className="flex-1 overflow-auto">
 
77
  />
78
  </div>
79
  </PipelineLayout>
80
+ <Footer />
81
  {modelInfo?.readme && (
82
  <ModelReadme
83
  readme={modelInfo.readme}
src/Footer.tsx CHANGED
@@ -1,9 +1,19 @@
1
  function Footer() {
2
  return (
3
- <footer className="bg-white border-t mt-12">
4
- <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
5
- <div className="flex items-center justify-between">
6
- <div className="flex items-center space-x-4 text-sm text-gray-500">
 
 
 
 
 
 
 
 
 
 
7
  <span>Powered by</span>
8
  <a
9
  href="https://huggingface.co/docs/transformers.js"
@@ -14,13 +24,10 @@ function Footer() {
14
  <span>🤗 Transformers.js</span>
15
  </a>
16
  </div>
17
- <div className="text-sm text-gray-500">
18
- All processing happens in your browser - your data stays private
19
- </div>
20
  </div>
21
  </div>
22
  </footer>
23
- );
24
  }
25
 
26
- export default Footer;
 
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">
5
+ <div className="flex flex-row items-center space-x-2 text-sm text-gray-500">
6
+ <a
7
+ href="https://vnavarro.dev"
8
+ target="_blank"
9
+ rel="noopener noreferrer"
10
+ className="text-lg tracking-wide text-transparent bg-clip-text bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-700 hover:to-pink-700 transition-all duration-300 "
11
+ >
12
+ vnavarro.dev
13
+ </a>
14
+ {/* vertical inline */}
15
+ <div className="w-[1px] h-4 bg-gray-500" />
16
+ <div className="flex flex-row space-x-2">
17
  <span>Powered by</span>
18
  <a
19
  href="https://huggingface.co/docs/transformers.js"
 
24
  <span>🤗 Transformers.js</span>
25
  </a>
26
  </div>
 
 
 
27
  </div>
28
  </div>
29
  </footer>
30
+ )
31
  }
32
 
33
+ export default Footer
src/components/Sidebar.tsx CHANGED
@@ -50,13 +50,13 @@ const Sidebar = ({ isOpen, onClose, setIsModalOpen }: SidebarProps) => {
50
  </div>
51
 
52
  {/* Content */}
53
- <div className="flex-1 overflow-y-auto p-4 space-y-6">
54
  {/* Pipeline Selection */}
55
- <div className="space-y-3 flex flex-row items-center space-x-4 text-center">
56
- <h3 className="text-md xl:text-lg font-semibold text-gray-900 w-2/5 mt-2">
57
  Choose a Pipeline
58
  </h3>
59
- <div className="w-3/5">
60
  <PipelineSelector
61
  pipeline={pipeline}
62
  setPipeline={setPipeline}
@@ -76,12 +76,12 @@ const Sidebar = ({ isOpen, onClose, setIsModalOpen }: SidebarProps) => {
76
  <div className="flex flex-col items-center justify-center">
77
  <ModelInfo />
78
  {/* Model README Button */}
79
- <div className="mt-4 w-42">
80
  <button
81
  onClick={() => setIsModalOpen(true)}
82
- className="flex items-center w-44 px-3 py-2 text-sm text-gray-600 bg-gray-50 rounded-lg border border-gray-200 hover:bg-gray-100 transition-colors"
83
  >
84
- <FileText className="w-4 h-4 mr-2 shrink-0" />
85
  <span className="truncate">View README.md</span>
86
  </button>
87
  </div>
 
50
  </div>
51
 
52
  {/* Content */}
53
+ <div className="flex-1 overflow-y-auto overflow-x-hidden p-4 space-y-6">
54
  {/* Pipeline Selection */}
55
+ <div className="space-y-3">
56
+ <h3 className="text-md xl:text-lg font-semibold text-gray-900 mb-2">
57
  Choose a Pipeline
58
  </h3>
59
+ <div className="w-full">
60
  <PipelineSelector
61
  pipeline={pipeline}
62
  setPipeline={setPipeline}
 
76
  <div className="flex flex-col items-center justify-center">
77
  <ModelInfo />
78
  {/* Model README Button */}
79
+ <div className="mt-4 w-full max-w-44 mx-auto">
80
  <button
81
  onClick={() => setIsModalOpen(true)}
82
+ className="flex items-center w-full px-3 py-2 text-sm text-gray-600 bg-gray-50 rounded-lg border border-gray-200 hover:bg-gray-100 transition-colors"
83
  >
84
+ <FileText className="w-4 h-4 mr-2 flex-shrink-0" />
85
  <span className="truncate">View README.md</span>
86
  </button>
87
  </div>
src/components/pipelines/ImageClassification.tsx CHANGED
@@ -185,7 +185,7 @@ function ImageClassification() {
185
  const busy = status !== 'ready' || isClassifying
186
 
187
  return (
188
- <div className="flex flex-col h-full max-h-[92vh] w-full p-4">
189
  <div className="flex items-center justify-between mb-4">
190
  <h1 className="text-2xl font-bold">Image Classification</h1>
191
  <div className="flex gap-2">
 
185
  const busy = status !== 'ready' || isClassifying
186
 
187
  return (
188
+ <div className="flex flex-col h-full max-h-[88vh] w-full p-4">
189
  <div className="flex items-center justify-between mb-4">
190
  <h1 className="text-2xl font-bold">Image Classification</h1>
191
  <div className="flex gap-2">
src/components/pipelines/TextClassification.tsx CHANGED
@@ -80,10 +80,8 @@ function TextClassification() {
80
  }
81
 
82
  return (
83
- <div className="flex flex-col h-full max-h-[92vh] w-full p-4">
84
- <h1 className="text-2xl font-bold mb-4 shrink-0">
85
- Text Classification
86
- </h1>
87
 
88
  <div className="flex flex-col lg:flex-row gap-4 flex-1 min-h-0">
89
  {/* Input Section */}
 
80
  }
81
 
82
  return (
83
+ <div className="flex flex-col h-full max-h-[88vh] w-full p-4">
84
+ <h1 className="text-2xl font-bold mb-4 shrink-0">Text Classification</h1>
 
 
85
 
86
  <div className="flex flex-col lg:flex-row gap-4 flex-1 min-h-0">
87
  {/* Input Section */}
src/components/pipelines/TextGeneration.tsx CHANGED
@@ -153,7 +153,7 @@ function TextGeneration() {
153
  const hasChatTemplate = modelInfo?.hasChatTemplate
154
 
155
  return (
156
- <div className="flex flex-col min-h-[70vh] h-full max-h-[92vh] w-full p-4">
157
  <div className="flex items-center justify-between mb-4">
158
  <h1 className="text-2xl font-bold">
159
  Text Generation {hasChatTemplate ? '(Chat)' : ''}
 
153
  const hasChatTemplate = modelInfo?.hasChatTemplate
154
 
155
  return (
156
+ <div className="flex flex-col min-h-[70vh] h-full max-h-[88vh] w-full p-4">
157
  <div className="flex items-center justify-between mb-4">
158
  <h1 className="text-2xl font-bold">
159
  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-[92vh] 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>
 
81
  const busy: boolean = status !== 'ready'
82
 
83
  return (
84
+ <div className="flex flex-col h-full max-h-[88vh] 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>