“botayla” commited on
Commit
dfcca37
·
1 Parent(s): 1807b9d

update API

Browse files
src/api/recommendation_routes.py CHANGED
@@ -1,3 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  from fastapi import APIRouter
2
  from typing import Dict, Any
3
 
@@ -7,8 +23,18 @@ router = APIRouter(prefix="/recommendations", tags=["Recommendations"])
7
  async def get_general_recommendations() -> Dict[str, Any]:
8
  """
9
  Placeholder endpoint for future ML recommendation logic.
10
- """
11
  return {
12
  "status": "success",
13
- "recommendations": []
14
- }
 
 
 
 
 
 
 
 
 
 
 
1
+ # from fastapi import APIRouter
2
+ # from typing import Dict, Any
3
+
4
+ # router = APIRouter(prefix="/recommendations", tags=["Recommendations"])
5
+
6
+ # @router.get("")
7
+ # async def get_general_recommendations() -> Dict[str, Any]:
8
+ # """
9
+ # Placeholder endpoint for future ML recommendation logic.
10
+ # """
11
+ # return {
12
+ # "status": "success",
13
+ # "recommendations": []
14
+ # }
15
+
16
+
17
  from fastapi import APIRouter
18
  from typing import Dict, Any
19
 
 
23
  async def get_general_recommendations() -> Dict[str, Any]:
24
  """
25
  Placeholder endpoint for future ML recommendation logic.
26
+ """
27
  return {
28
  "status": "success",
29
+ "recommendations": [
30
+ {
31
+ "id": "vS07S_yIn_U",
32
+ "title": "Introduction to Neural Networks",
33
+ "description": "Learn the basics of Neural Networks in this educational video.",
34
+ "thumbnail": "https://i.ytimg.com/vi/vS07S_yIn_U/mqdefault.jpg",
35
+ "channelTitle": "AI Academy",
36
+ "url": "https://www.youtube.com/watch?v=vS07S_yIn_U",
37
+ "type": "youtube_video"
38
+ }
39
+ ]
40
+ }
src/recommendation/recommender.py CHANGED
@@ -111,7 +111,7 @@ class RecommendationService:
111
  }
112
  )
113
  # ✨ السطر ده اللي هيظهرلك الفيديو في الـ Logs
114
- logger.info(f"✅ Found Video: {videos['title']}")
115
 
116
  # ✨ السطر ده عشان تعرفي إجمالي اللي رجع كام فيديو
117
  logger.info(f"🚀 Total videos fetched: {len(videos)}")
 
111
  }
112
  )
113
  # ✨ السطر ده اللي هيظهرلك الفيديو في الـ Logs
114
+ logger.info(f"✅ Found Video: {snippet['title']}")
115
 
116
  # ✨ السطر ده عشان تعرفي إجمالي اللي رجع كام فيديو
117
  logger.info(f"🚀 Total videos fetched: {len(videos)}")