saherPervaiz commited on
Commit
650d5b5
·
verified ·
1 Parent(s): 41ed1bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ def get_scholarships(location, interests):
21
 
22
  if response.status_code == 200:
23
  # Sample response (You should replace this with real scholarship data)
24
- return [{"title": f"Scholarship {i+1}", "description": "This is a sample description.", "eligibility": "Any student from any background."} for i in range(5)]
25
  else:
26
  return []
27
 
@@ -33,7 +33,7 @@ def get_internships():
33
 
34
  if response.status_code == 200:
35
  # Sample response (You should replace this with real internship data)
36
- return [{"jobtitle": f"Internship {i+1}", "company": "Sample Company", "location": "Remote", "snippet": "Description of the internship."} for i in range(5)]
37
  else:
38
  return []
39
 
 
21
 
22
  if response.status_code == 200:
23
  # Sample response (You should replace this with real scholarship data)
24
+ return [{"title": f"Scholarship {i+1}", "description": post['body'], "eligibility": "Any student from any background."} for i, post in enumerate(response.json())[:5]]
25
  else:
26
  return []
27
 
 
33
 
34
  if response.status_code == 200:
35
  # Sample response (You should replace this with real internship data)
36
+ return [{"jobtitle": f"Internship {i+1}", "company": "Sample Company", "location": "Remote", "snippet": post['body']} for i, post in enumerate(response.json())[:5]]
37
  else:
38
  return []
39