diff --git a/main.py b/main.py index 0f82984..e0880c3 100644 --- a/main.py +++ b/main.py @@ -2,9 +2,23 @@ from config import API_KEY from openai import OpenAI from fileFormatConverter import convert_file +import requests + +def load_homeworks(urls): + for url in urls: # Send a GET request to the URL + with requests.get(url, stream=True) as response: + response.raise_for_status() # Raise an error for bad responses + # Open a local file with write-binary mode + with open(f'file_{urls.index(url)}', 'wb') as f: + # Write the content of the response to the file in chunks + for chunk in response.iter_content(chunk_size=8192): + f.write(chunk) + return f + +# Example usage -def main(): +def create_subtasks_for_homework(): #inputFileName = input("enter input file name with extension (supported types: pdf, docx): ") # outputFileName = input("enter output file name without extension:") diff --git a/package-lock.json b/package-lock.json index 7f9abd1..b288cd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2330,12 +2330,6 @@ "dev": true, "license": "ISC" }, - "node_modules/fontfaceobserver": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/fontfaceobserver/-/fontfaceobserver-2.3.0.tgz", - "integrity": "sha512-6FPvD/IVyT4ZlNe7Wcn5Fb/4ChigpucKYSvD6a+0iMoLn2inpo711eyIcKjmDtE5XNcgAkSH9uN/nfAeZzHEfg==", - "license": "BSD-2-Clause" - }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -2407,6 +2401,21 @@ } } }, + "node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", diff --git a/package.json b/package.json index 19f3db8..272f640 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,11 @@ "framer": "^2.4.1", "next": "14.2.15", "react": "^18", - "react-circular-progressbar": "^2.1.0", - "react-dom": "^18" + "react-dom": "^18", + "next": "14.2.15" }, "devDependencies": { + "typescript": "^5", "@types/node": "^20", "@types/react": "^18", "@types/react-dom": "^18", @@ -23,6 +24,7 @@ "eslint-config-next": "14.2.15", "postcss": "^8", "tailwindcss": "^3.4.1", - "typescript": "^5" + "eslint": "^8", + "eslint-config-next": "14.2.15" } } diff --git a/requirements.txt b/requirements.txt index fbacd07..d19f3e2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ openai pdfplumber -python-docx \ No newline at end of file +python-docx +requests \ No newline at end of file diff --git a/src/app/landing/page.tsx b/src/app/landing/page.tsx index cfc2174..fdc8d22 100644 --- a/src/app/landing/page.tsx +++ b/src/app/landing/page.tsx @@ -1,4 +1,4 @@ -"use client" +"use client"; import arrow from "../../img/arrow.png"; import gradient from "../../img/gradient.png"; @@ -7,25 +7,39 @@ import { useState } from "react"; import { Time } from "@/app/landing/time"; export default function Landing() { - const [clicked, setClicked] = useState(false); + const [clicked1, setClicked1] = useState(false); - return ( - clicked ? -