Skip to content

Commit 1955dc2

Browse files
committed
clean up
1 parent a00a604 commit 1955dc2

File tree

11 files changed

+3066
-388
lines changed

11 files changed

+3066
-388
lines changed

Backend/Perfect_video.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import boto3
1010

1111

12-
aws_access_key_id = 'AKIAZTHHIOR4JJ5HLTUB'
13-
aws_secret_access_key = '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'
12+
aws_access_key_id = ''
13+
aws_secret_access_key = ''
1414
bucket_name = 'learnmateai'
1515

1616
# Create an S3 client
@@ -26,7 +26,7 @@
2626
model = SentenceTransformer('bert-base-nli-mean-tokens')
2727

2828
# YouTube API parameters
29-
API_KEY = "AIzaSyAMD4FgbCjmp-_8g8nams4tsno4DV1mDnE"
29+
API_KEY = ""
3030
MAX_RESULTS = 5 # Maximum number of search results to retrieve
3131

3232
# Search for videos using the YouTube API
@@ -58,15 +58,10 @@ def get_best_video(email: str,topic: str):
5858

5959
response = s3_client.list_objects_v2(Bucket=bucket_name, Prefix=prefix)
6060

61-
62-
63-
64-
6561
if "Contents" in response:
6662
file_key = prefix + f"/{topic}"
6763
file_obj = s3_client.get_object(Bucket=bucket_name, Key=file_key)
6864
file_content = file_obj["Body"].read().decode("utf-8")
69-
print(file_content)
7065
# Encode the input text
7166
input_text = file_content
7267

Backend/Student_analyser.py

Lines changed: 0 additions & 170 deletions
This file was deleted.

Backend/Study_planner.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
import json
66

77
app = APIRouter()
8-
s3_access_key = "AKIAZTHHIOR4JJ5HLTUB"
9-
s3_secret_access_key = "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"
8+
s3_access_key = ""
9+
s3_secret_access_key = ""
1010
s3_bucket_name = "learnmateai"
1111

1212
s3 = boto3.client("s3", aws_access_key_id=s3_access_key, aws_secret_access_key=s3_secret_access_key)
1313

1414
# Set up OpenAI API credentials
15-
openai.api_key = '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'
15+
openai.api_key = ''
1616

1717
def processor( data,current_data, final_date):
1818

@@ -48,11 +48,9 @@ async def generateStudyPlan(email: str,current_date: str,final_date: str):
4848

4949
json_text=processor(text,current_date,final_date)
5050
save_plan(email,json_text)
51-
# Parse the file content as JSON
52-
json_content = json.loads(json_text)
5351

5452
# Return the JSON content
55-
return json_content
53+
return {"status" : "plan created successfully"}
5654
except Exception as e:
5755
return {'error': str(e)}
5856

LinkedList$Node.class

-375 Bytes
Binary file not shown.

LinkedList.class

-1.93 KB
Binary file not shown.

0 commit comments

Comments
 (0)