Skip to content

Commit 711824a

Browse files
committed
Update README.md for clearer virtual environment activation instructions; enhance UI structure and styling in page.tsx
1 parent 4ed5a0d commit 711824a

File tree

2 files changed

+43
-31
lines changed

2 files changed

+43
-31
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ cd backend
3434

3535
# Create virtual environment
3636
python -m venv venv
37-
source venv/bin/activate # On Windows: venv\Scripts\activate
37+
# On Windows:
38+
venv\Scripts\activate
39+
# on macos
40+
source venv/bin/activate
3841

3942
# Install dependencies
4043
pip install -r ../requirements.txt

frontend/app/page.tsx

Lines changed: 39 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// pages/index.tsx
21
"use client";
32

43
import React, { useState } from 'react';
@@ -30,40 +29,50 @@ export default function Home() {
3029
};
3130

3231
return (
33-
<>
34-
<div className="min-h-screen bg-gray-900 text-white flex flex-col items-center justify-center px-4" style={{ backgroundImage: "url('/background.jpg'), backgroundSize: 'cover', backgroundPosition: 'center'" }}>
35-
<div className="absolute inset-0 bg-black opacity-50"></div>
36-
<h1 className="text-3xl font-bold mb-6">🎬 Movie Recommender</h1>
32+
<div
33+
className="min-h-screen bg-gray-900 text-white px-4 relative flex items-center justify-center"
34+
style={{
35+
backgroundImage: "url('/background.jpg')",
36+
backgroundSize: 'cover',
37+
backgroundPosition: 'center',
38+
}}
39+
>
40+
{/* 🔲 Background Overlay */}
41+
<div className="absolute inset-0 bg-black opacity-50 z-0" />
3742

38-
<input
39-
type="text"
40-
placeholder="Enter Video ID"
41-
value={selectedId}
42-
onChange={(e) => setSelectedId(e.target.value)}
43-
className="p-2 rounded text-black w-64 mb-4 bg-gray-200"
44-
/>
43+
{/* 🔳 Foreground UI */}
44+
<div className="z-10 flex flex-col items-center">
45+
<h1 className="text-3xl font-bold mb-6">🎬 Movie Recommender</h1>
4546

46-
<button
47-
onClick={handleFetch}
48-
className="bg-indigo-600 hover:bg-indigo-700 text-white font-semibold py-2 px-4 rounded"
49-
>
50-
🔍 Show Recommendations
51-
</button>
47+
<input
48+
type="text"
49+
placeholder="Enter Video ID"
50+
value={selectedId}
51+
onChange={(e) => setSelectedId(e.target.value)}
52+
className="p-2 rounded text-black w-64 mb-4 bg-gray-200 focus:outline-none focus:ring-2 focus:ring-indigo-500"
53+
/>
5254

53-
{loading && <p className="mt-4">Loading...</p>}
55+
<button
56+
onClick={handleFetch}
57+
className="bg-indigo-600 hover:bg-indigo-700 text-white font-semibold py-2 px-4 rounded transition"
58+
>
59+
🔍 Show Recommendations
60+
</button>
5461

55-
<div className="mt-8 w-full max-w-xl">
56-
{recommendations.map((rec, i) => (
57-
<div key={i} className="bg-gray-800 rounded p-4 mb-4 shadow">
58-
<h2 className="text-xl font-semibold mb-2">🎬 Recommendation {i + 1}</h2>
59-
<p><strong>Video ID:</strong> {rec.video_id}</p>
60-
<p><strong>Video Type:</strong> {rec.video_type}</p>
61-
<p><strong>Music Type:</strong> {rec.music_type}</p>
62-
<p><strong>Tag:</strong> {rec.tag}</p>
63-
</div>
64-
))}
62+
{loading && <p className="mt-4">Loading...</p>}
63+
64+
<div className="mt-8 w-full max-w-xl">
65+
{recommendations.map((rec, i) => (
66+
<div key={i} className="bg-gray-800 rounded p-4 mb-4 shadow">
67+
<h2 className="text-xl font-semibold mb-2">🎬 Recommendation {i + 1}</h2>
68+
<p><strong>Video ID:</strong> {rec.video_id}</p>
69+
<p><strong>Video Type:</strong> {rec.video_type}</p>
70+
<p><strong>Music Type:</strong> {rec.music_type}</p>
71+
<p><strong>Tag:</strong> {rec.tag}</p>
72+
</div>
73+
))}
74+
</div>
6575
</div>
6676
</div>
67-
</>
6877
);
6978
}

0 commit comments

Comments
 (0)