-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (21 loc) · 754 Bytes
/
main.py
File metadata and controls
30 lines (21 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from dotenv import load_dotenv
import os
from app.searcher import search_topic
from app.summarizer import summarize_content
from app.slide_maker import generate_slides
load_dotenv() # Load .env
openai_key = os.getenv("OPENAI_API_KEY")
if not openai_key:
raise Exception("OpenAI API Key not found in .env")
print("🔍 AI Task Automator for Students")
topic = input("Enter a topic: ")
# Step 1: Search
print("Searching Google...")
raw = search_topic(topic)
# Step 2: Summarize
print("Summarizing content...")
summary = summarize_content(raw, topic, openai_key)
# Step 3: Generate Slides
print("Generating slide deck...")
file_path = generate_slides(summary, topic, bullets_per_slide=4)
print(f"✅ Done! Presentation saved as: {file_path}")