Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions LessonCraft-1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

# LESSON CRAFT - Educational Website
"Grow your skills to advance your career path - Lesson Craft offers you a variety of courses that help in your skill development and make you confident for the job. Enroll and get started."

Lesson Craft is an educational website that provides users with various courses Lesson Craft can offer. It revolves around creating a responsive website using HTML, CSS, and JavaScript. The website is being provided with multi-paged functionalities where users can visit various pages related to the website like Home, About, Courses, and Contact pages. Also, the website is being deployed using the Netlify service.

## Table of Contents
- [Project Overview](#project-overview)
- [Live Demo](#live-demo)
- [Features](#features)
- [Tech Stack](#tech-stack)
- [Website Preview](#website-preview)

## Project Overview
Lesson Craft - Education Website is an online platform where Lesson Craft offers various courses for users or students who are tech enthusiasts and are willing to either learn a new skill in a technical field or are willing to upskill themselves. The website is responsive according to various screen sizes and also shows the navigation bar according to the different screen sizes.

## Live Demo
Checkout the live demonstration of this responsive website: [Lesson Craft - Educational Website](https://edify-educational-app.vercel.app/)

## Features
- **Home:** The page has various features like a header section, a fixed navigation section, categories, popular courses, FAQs, and some testimonials.
- **About:** The page has an achievement section where Lesson Craft talks about their achievements and shows a section for the team of tutors Lesson Craft has.
- **Courses:** It shows the various courses that are provided by Lesson Craft for their students or users.
- **Contact:** The page shows the various methods through which a user or student can reach the Lesson Craft team and a section where they can write their messages to them.

## Tech Stack
The Lesson Craft - Educational Website was built using the following technologies and tools:

- **HTML:** The foundation of the website's structure and content.
- **CSS:** For styling and making the website visually appealing.
- **JavaScript**: For changing properties of the navigation bar to be shown while scrolling and other functionalities.
- **Netlify:** The website is deployed and hosted on Netlify, making it accessible online.

264 changes: 264 additions & 0 deletions LessonCraft-1/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="./logo.svg" type="image/svg+xml">
<link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/about.css">
<title>EDIFY - Educational Website</title>
<style>
body {
background-image: url("./images/bg-texture.png");
background-attachment: fixed;
}
</style>
</head>
<body>
<nav>
<div class="container nav__container">
<a href="index.html"><h4>EDIFY</h4></a>
<ul class="nav__menu">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="courses.html">Courses</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
<button id="open-menu-btn"><i class='bx bx-menu'></i></button>
<button id="close-menu-btn"><i class='bx bx-x'></i></button>
</div>
</nav>

<section class="about__achievements">
<div class="container about__achievements-container">
<div class="about__achievements-left">
<img src="./images/about achievements.svg" alt="achievements-img">
</div>
<div class="about__achievements-right">
<h1>Achievements</h1>
<p>Edify has achieved great a feat of offering online courses in India and global for a decade and above, and it still is on its path of nurturing talents across the globe. With around 450+ courses provided by Edify in the last decade, Edify has certified 79,000+ students across the globe and were awarded 25+ times in this field. Edify hopes to keep improving its courses and nurtures the upcoming students who are joining us on their journey to be successful.</p>
<div class="achievements__cards">
<article class="achievement__card">
<span class="achievement__icon"><i class='bx bx-video'></i></span>
<h3>450+</h3>
<p>Courses</p>
</article>
<article class="achievement__card">
<span class="achievement__icon"><i class='bx bx-group' style='color:#ffffff' ></i></span>
<h3>79,000+</h3>
<p>Students</p>
</article>
<article class="achievement__card">
<span class="achievement__icon"><i class='bx bx-award' style='color:#ffffff' ></i></span>
<h3>26+</h3>
<p>Awards</p>
</article>
</div>
</div>
</div>
</section>

<section class="team">
<h2>Meet Our Team</h2>
<div class="container team__container">
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm1.jpg" alt="tm1">
</div>
<div class="team__member-info">
<h4>Shatta Vale</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm2.jpg" alt="tm2">
</div>
<div class="team__member-info">
<h4>Mia Jones</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm3.jpg" alt="tm3">
</div>
<div class="team__member-info">
<h4>Diana Ayi</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm4.jpg" alt="tm4">
</div>
<div class="team__member-info">
<h4>John Dumelo</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm5.jpg" alt="tm5">
</div>
<div class="team__member-info">
<h4>Ruth Stockings</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm6.jpg" alt="tm6">
</div>
<div class="team__member-info">
<h4>Edem Quist</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm7.jpg" alt="tm7">
</div>
<div class="team__member-info">
<h4>Lila James</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm8.jpg" alt="tm8">
</div>
<div class="team__member-info">
<h4>Menz Gold</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm9.jpg" alt="tm9">
</div>
<div class="team__member-info">
<h4>Lily Adams</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
<article class="team__member">
<div class="team__member-image">
<img src="./images/tm10.jpg" alt="tm10">
</div>
<div class="team__member-info">
<h4>Josephine Stuart</h4>
<p>Expert Tutor</p>
</div>
<div class="team__member-socials">
<a href="https://www.instagram.com" target="_blank"><i class='bx bxl-instagram'></i></a>
<a href="https://twitter.com" target="_blank"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
<a href="https://www.linkedin.com" target="_blank"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</div>
</article>
</div>
</section>

<footer>
<div class="container footer__container">
<div class="footer__1">
<a href="index.html" class="footer__logo"><h4>EDIFY</h4></a>
<p>Grow your skills to advance your career</p>
</div>

<div class="footer__2">
<h4>Permalinks</h4>
<ul class="permalinks">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="courses.html">Courses</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>

<div class="footer__3">
<h4>Privacy</h4>
<ul class="privacy">
<li><a href="">Privacy Policy</a></li>
<li><a href="">Terms and Condition</a></li>
<li><a href="">Refund Policy</a></li>
</ul>
</div>

<div class="footer__4">
<h4>Contact US</h4>
<div>
<p>+01 233 364 5478</p>
<p>contact@edify.com</p>
</div>
<ul class="footer__socials">
<li>
<a href="https://www.facebook.com"><i class='bx bxl-facebook-circle'></i></a>
</li>
<li>
<a href="https://www.instagram.com"><i class='bx bxl-instagram' style='color:#ffffff' ></i></a>
</li>
<li>
<a href="https://twitter.com"><i class='bx bxl-twitter' style='color:#ffffff' ></i></a>
</li>
<li>
<a href="https://www.linkedin.com"><i class='bx bxl-linkedin' style='color:#ffffff' ></i></a>
</li>
</ul>
</div>
</div>
<div class="footer__copyright">
<small>Copyright &#169; 2023 Edify, Inc. All Rights Reserved.</small>
</div>
</footer>

<script src="./main.js"></script>
</body>
</html>
84 changes: 84 additions & 0 deletions LessonCraft-1/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
from flask import Flask, render_template
import gradio as gr
from llamaapi import LlamaAPI
from langchain_experimental.llms import ChatLlamaAPI
import PyPDF2

# Initialize Flask app
app = Flask(__name__)

# Initialize the LlamaAPI
llama = LlamaAPI("LL-QoWL9fXItXVpIn4aeAJrWF5ktefdgE5y6iBvV0sIbEgpd62qyKGbTi1fKkFfDnZh")
model = ChatLlamaAPI(client=llama)

def extract_text_from_pdf(file_path):
"""Extracts text from a PDF file, handling potential access errors."""
try:
with open(file_path, 'rb') as pdf_file:
pdf_reader = PyPDF2.PdfReader(pdf_file)
text = ""
for page_num in range(len(pdf_reader.pages)):
page = pdf_reader.pages[page_num]
text += page.extract_text() or ""
return text
except (FileNotFoundError, PermissionError) as e:
return f"Error: {e}. Please check the file path and permissions."

def create_study_plan(file_path_1, file_path_2):
"""Extracts text from two PDF files, then starts conversation with LLM."""
extracted_text_1 = extract_text_from_pdf(file_path_1)
extracted_text_2 = extract_text_from_pdf(file_path_2)

# Check if there were errors during extraction
if "Error:" in extracted_text_1:
return extracted_text_1 # Return error message from the first PDF
if "Error:" in extracted_text_2:
return extracted_text_2 # Return error message from the second PDF

# Split the extracted texts into parts
calendar_part = extracted_text_1.split("Syllabus Content", 1)
syllabus_part = extracted_text_2

if len(calendar_part) < 2:
return "Error: 'Syllabus Content' section not found in the academic calendar PDF."

prompt = (
f"Based on the following academic calendar content:\n{calendar_part[0]}\n\n"
f"And the syllabus content:\n{syllabus_part}\n\n"
"Please generate a comprehensive and detailed study plan for the upcoming semester. "
"Include the following elements for each unit:\n"
"- Title: The name of the unit or topic\n"
"- Weeks: The week number and title of the unit\n"
"- Daily Schedule: A detailed daily schedule including specific activities and duration\n"
"- Study Methods: Recommended methods for studying each topic\n"
"- Resources: Suggested books, articles, or websites for reference\n"
"- Assessments: Suggested quizzes or assignments to reinforce learning\n"
"Structure the plan clearly with bullet points for easy readability. Ensure to provide sufficient detail for each topic."
)

convo = model.invoke(prompt)
return convo.content

# Define the Gradio interface
iface = gr.Interface(
fn=create_study_plan,
inputs=["file", "file"],
outputs="text",
title="Generate Comprehensive Study Plan from Two PDFs",
description="Upload two PDFs - one for the academic calendar and one for the syllabus - and receive a detailed study plan.",
allow_flagging=False
)

# Flask route for the homepage
@app.route('/')
def home():
return render_template('index.html')

# Flask route for Gradio interface
@app.route('/generate')
def generate_study_plan():
return iface.launch(share=False, inline=True)

# Run the Flask app
if __name__ == "__main__":
app.run(debug=True)
Loading