-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_presentation.py
More file actions
508 lines (456 loc) Β· 17.8 KB
/
Copy pathgenerate_presentation.py
File metadata and controls
508 lines (456 loc) Β· 17.8 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
"""
Generate PowerPoint Presentation for Profyler Project
Simple, clear slides for teacher presentation
"""
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.dml.color import RGBColor
import os
def create_profyler_presentation():
"""Create comprehensive PPT for Profyler project"""
# Create presentation
prs = Presentation()
prs.slide_width = Inches(10)
prs.slide_height = Inches(7.5)
# Define color scheme (Purple gradient theme)
PRIMARY_COLOR = RGBColor(102, 126, 234) # #667eea
SECONDARY_COLOR = RGBColor(118, 75, 162) # #764ba2
TEXT_COLOR = RGBColor(51, 51, 51)
LIGHT_GRAY = RGBColor(107, 114, 128)
def add_title_slide(title, subtitle=""):
"""Add a title slide"""
slide = prs.slides.add_slide(prs.slide_layouts[6]) # Blank layout
# Background
background = slide.shapes.add_shape(
1, # Rectangle
0, 0, prs.slide_width, prs.slide_height
)
background.fill.solid()
background.fill.fore_color.rgb = RGBColor(255, 255, 255)
background.line.fill.background()
# Title
title_box = slide.shapes.add_textbox(
Inches(0.5), Inches(2.5), Inches(9), Inches(1.5)
)
title_frame = title_box.text_frame
title_frame.text = title
title_p = title_frame.paragraphs[0]
title_p.font.size = Pt(54)
title_p.font.bold = True
title_p.font.color.rgb = PRIMARY_COLOR
title_p.alignment = PP_ALIGN.CENTER
# Subtitle
if subtitle:
subtitle_box = slide.shapes.add_textbox(
Inches(0.5), Inches(4.2), Inches(9), Inches(1)
)
subtitle_frame = subtitle_box.text_frame
subtitle_frame.text = subtitle
subtitle_p = subtitle_frame.paragraphs[0]
subtitle_p.font.size = Pt(24)
subtitle_p.font.color.rgb = LIGHT_GRAY
subtitle_p.alignment = PP_ALIGN.CENTER
return slide
def add_content_slide(title, content_items, bullet_style=True):
"""Add a content slide with bullet points or paragraphs"""
slide = prs.slides.add_slide(prs.slide_layouts[6])
# Title
title_box = slide.shapes.add_textbox(
Inches(0.5), Inches(0.4), Inches(9), Inches(0.8)
)
title_frame = title_box.text_frame
title_frame.text = title
title_p = title_frame.paragraphs[0]
title_p.font.size = Pt(36)
title_p.font.bold = True
title_p.font.color.rgb = PRIMARY_COLOR
# Content
content_box = slide.shapes.add_textbox(
Inches(0.8), Inches(1.5), Inches(8.4), Inches(5.5)
)
content_frame = content_box.text_frame
content_frame.word_wrap = True
for i, item in enumerate(content_items):
if i > 0:
p = content_frame.add_paragraph()
else:
p = content_frame.paragraphs[0]
p.text = item
p.font.size = Pt(20)
p.font.color.rgb = TEXT_COLOR
p.space_after = Pt(12)
if bullet_style:
p.level = 0
return slide
def add_two_column_slide(title, left_content, right_content):
"""Add a slide with two columns"""
slide = prs.slides.add_slide(prs.slide_layouts[6])
# Title
title_box = slide.shapes.add_textbox(
Inches(0.5), Inches(0.4), Inches(9), Inches(0.8)
)
title_frame = title_box.text_frame
title_frame.text = title
title_p = title_frame.paragraphs[0]
title_p.font.size = Pt(36)
title_p.font.bold = True
title_p.font.color.rgb = PRIMARY_COLOR
# Left column
left_box = slide.shapes.add_textbox(
Inches(0.5), Inches(1.5), Inches(4.5), Inches(5.5)
)
left_frame = left_box.text_frame
left_frame.word_wrap = True
for i, item in enumerate(left_content):
if i > 0:
p = left_frame.add_paragraph()
else:
p = left_frame.paragraphs[0]
p.text = item
p.font.size = Pt(18)
p.font.color.rgb = TEXT_COLOR
p.space_after = Pt(10)
# Right column
right_box = slide.shapes.add_textbox(
Inches(5.2), Inches(1.5), Inches(4.3), Inches(5.5)
)
right_frame = right_box.text_frame
right_frame.word_wrap = True
for i, item in enumerate(right_content):
if i > 0:
p = right_frame.add_paragraph()
else:
p = right_frame.paragraphs[0]
p.text = item
p.font.size = Pt(18)
p.font.color.rgb = TEXT_COLOR
p.space_after = Pt(10)
return slide
# ========================================
# SLIDE 1: TITLE SLIDE
# ========================================
slide1 = add_title_slide(
"Profyler",
"AI-Powered Research Impact Prediction System"
)
# Add authors
authors_box = slide1.shapes.add_textbox(
Inches(0.5), Inches(5.5), Inches(9), Inches(1)
)
authors_frame = authors_box.text_frame
authors_frame.text = "Om Harsh (E23CSEU2423) & Kshitiz Yadav (E23CSEU0338)\nChitkara University"
for p in authors_frame.paragraphs:
p.font.size = Pt(18)
p.font.color.rgb = TEXT_COLOR
p.alignment = PP_ALIGN.CENTER
# ========================================
# SLIDE 2: PROJECT IDEA
# ========================================
idea_content = [
"Problem: Researchers and institutions need automated tools to evaluate research impact and identify emerging trends",
"",
"Solution: Profyler - An AI system that:",
" β’ Aggregates publications from multiple academic databases",
" β’ Predicts citation impact using machine learning (99.91% accuracy)",
" β’ Analyzes research trends and collaboration patterns",
" β’ Provides strategic recommendations for future research",
"",
"Target Users: Researchers, academic institutions, funding agencies"
]
add_content_slide("π‘ Project Idea", idea_content, bullet_style=False)
# ========================================
# SLIDE 3: TECHNICAL APPROACH - FLOW DIAGRAM
# ========================================
slide3 = prs.slides.add_slide(prs.slide_layouts[6])
# Title
title_box = slide3.shapes.add_textbox(
Inches(0.5), Inches(0.4), Inches(9), Inches(0.8)
)
title_frame = title_box.text_frame
title_frame.text = "βοΈ Technical Approach - System Flow"
title_p = title_frame.paragraphs[0]
title_p.font.size = Pt(36)
title_p.font.bold = True
title_p.font.color.rgb = PRIMARY_COLOR
# Flow diagram boxes
flow_steps = [
("1. Data Collection", "Fetch from Semantic Scholar,\nDBLP, CrossRef APIs"),
("2. Data Merging", "Intelligent deduplication\nusing DOI & title matching"),
("3. Feature Engineering", "Extract 36 features:\nTemporal, Venue, Collaboration,\nContent, Domain, Innovation"),
("4. ML Pipeline", "SMOTE balancing β\nRandom Forest + Gradient Boost\nβ Ensemble Prediction"),
("5. AI Analysis", "Trend analysis, Impact prediction,\nStrategic recommendations"),
("6. Presentation", "Web interface with charts,\nExcel/Word reports")
]
y_pos = 1.5
for step, description in flow_steps:
# Box
box = slide3.shapes.add_shape(
1, # Rectangle
Inches(1.5), Inches(y_pos), Inches(7), Inches(0.8)
)
box.fill.solid()
box.fill.fore_color.rgb = RGBColor(240, 240, 255)
box.line.color.rgb = PRIMARY_COLOR
box.line.width = Pt(2)
# Text
text_frame = box.text_frame
text_frame.text = f"{step}\n{description}"
text_frame.word_wrap = True
p = text_frame.paragraphs[0]
p.font.size = Pt(14)
p.font.bold = True
p.font.color.rgb = PRIMARY_COLOR
if len(text_frame.paragraphs) > 1:
for para in text_frame.paragraphs[1:]:
para.font.size = Pt(11)
para.font.color.rgb = TEXT_COLOR
# Arrow (except for last step)
if y_pos < 6.5:
arrow = slide3.shapes.add_shape(
12, # Down arrow
Inches(4.8), Inches(y_pos + 0.85), Inches(0.4), Inches(0.25)
)
arrow.fill.solid()
arrow.fill.fore_color.rgb = PRIMARY_COLOR
arrow.line.fill.background()
y_pos += 1.0
# ========================================
# SLIDE 4: TECH STACK
# ========================================
tech_left = [
"Backend:",
"β’ Flask 3.0.3 (REST API)",
"β’ Python 3.10",
"",
"Frontend:",
"β’ Streamlit 1.29.0",
"β’ Plotly (Charts)",
"",
"Data Sources:",
"β’ Semantic Scholar API",
"β’ DBLP API",
"β’ CrossRef API"
]
tech_right = [
"Machine Learning:",
"β’ scikit-learn 1.3.2",
"β’ imbalanced-learn (SMOTE)",
"β’ pandas, numpy",
"",
"Libraries:",
"β’ requests (API calls)",
"β’ openpyxl (Excel export)",
"β’ python-docx (Word export)",
"β’ aiohttp (async fetching)",
"",
"Deployment:",
"β’ Local servers (development)",
"β’ Production-ready architecture"
]
add_two_column_slide("π οΈ Technology Stack", tech_left, tech_right)
# ========================================
# SLIDE 5: NOVELTY
# ========================================
novelty_content = [
"1. Multi-Source Aggregation",
" First system to intelligently merge 3 academic databases with 460+ publications per researcher",
"",
"2. Class Imbalance Handling",
" SMOTE optimization achieving 99.91% accuracy on severely imbalanced data (84.6% zero citations)",
"",
"3. Comprehensive Feature Engineering",
" 36 domain-specific features spanning 6 categories (vs. traditional h-index only)",
"",
"4. Ensemble Learning Approach",
" Random Forest + Gradient Boosting with soft voting (99.93% accuracy each)",
"",
"5. Real-time Research Profiling",
" Interactive web interface with AI-powered insights and trend predictions"
]
add_content_slide("π Novelty & Innovation", novelty_content, bullet_style=False)
# ========================================
# SLIDE 6: FEASIBILITY & VIABILITY
# ========================================
feasibility_left = [
"Technical Feasibility:",
"",
"β
Fully Implemented",
"β’ Working system with Flask + Streamlit",
"β’ Trained models (99.91% accuracy)",
"β’ Multi-source data aggregation",
"",
"β
Scalable Architecture",
"β’ Async API calls",
"β’ Configurable limits (10k pubs)",
"β’ Memory-efficient SMOTE (30%)",
"",
"β
Production Ready",
"β’ Error handling & SSL fixes",
"β’ Auto-save functionality",
"β’ Export to CSV/Excel/Word"
]
feasibility_right = [
"Economic Viability:",
"",
"π° Low Cost",
"β’ Free academic APIs",
"β’ Open-source libraries",
"β’ Minimal infrastructure",
"",
"π High Value",
"β’ Saves researcher time",
"β’ Institutional decision support",
"β’ Funding allocation insights",
"",
"π― Market Potential",
"β’ Universities & research labs",
"β’ Funding agencies",
"β’ Academic publishers",
"β’ Citation analysis companies"
]
add_two_column_slide("β
Feasibility & Viability", feasibility_left, feasibility_right)
# ========================================
# SLIDE 7: IMPACT & BENEFITS
# ========================================
impact_content = [
"Academic Impact:",
"β’ 78.43% improvement over baseline (21.48% β 99.91% accuracy)",
"β’ Publishable in top-tier conferences (ACM KDD, AAAI, WSDM)",
"",
"Practical Benefits:",
"β’ Automated Research Profiling: Generate comprehensive profiles in minutes",
"β’ Impact Prediction: Identify high-potential papers before they gain citations",
"β’ Trend Analysis: Discover emerging research topics and collaboration opportunities",
"β’ Strategic Guidance: AI-powered recommendations for future research directions",
"",
"Stakeholder Benefits:",
"β’ Researchers: Understand impact, find collaborators, identify gaps",
"β’ Institutions: Evaluate faculty, allocate resources, track research growth",
"β’ Funding Agencies: Assess grant applications, predict research outcomes"
]
add_content_slide("π― Impact & Benefits", impact_content, bullet_style=False)
# ========================================
# SLIDE 8: RESULTS & METRICS
# ========================================
results_left = [
"Performance Metrics:",
"",
"π― Accuracy: 99.91%",
"π― Precision: 99.91%",
"π― Recall: 99.91%",
"π― F1-Score: 99.90%",
"",
"Dataset:",
"β’ 10,000 publications (training)",
"β’ 70-15-15 train-val-test split",
"β’ Multiple domains & years",
"β’ Real citations (0 to 1000+)"
]
results_right = [
"Model Comparison:",
"",
"Baseline (Heuristic):",
" 21.48% accuracy",
"",
"Random Forest:",
" 99.93% accuracy",
"",
"Gradient Boosting:",
" 99.93% accuracy",
"",
"Ensemble (Our Model):",
" 99.93% accuracy",
"",
"Test Case:",
" Andrew Ng: 460 pubs aggregated"
]
add_two_column_slide("π Results & Metrics", results_left, results_right)
# ========================================
# SLIDE 9: DEMO SCREENSHOTS
# ========================================
demo_content = [
"System Features:",
"",
"π Input Interface",
" β’ Single/multi-author search",
" β’ CSV/Excel/BibTeX upload",
" β’ Advanced filters (year, type, affiliation)",
"",
"π Analysis Dashboard",
" β’ Key metrics: H-index, i10-index, total publications",
" β’ Interactive charts: Timeline, impact distribution, trends",
" β’ Publication table with filters",
"",
"π€ AI Insights",
" β’ Impact predictions per paper",
" β’ Research trend analysis (upward/stable/downward)",
" β’ Collaboration recommendations",
" β’ Strategic insights for future research"
]
add_content_slide("π₯οΈ System Demo", demo_content, bullet_style=False)
# ========================================
# SLIDE 10: FUTURE ENHANCEMENTS
# ========================================
future_content = [
"Planned Improvements:",
"",
"π¬ Advanced ML",
" β’ Deep learning with BERT embeddings for content analysis",
" β’ Network-based features from co-authorship graphs",
" β’ Real-time citation tracking with incremental updates",
"",
"π Extended Analysis",
" β’ Cross-domain validation (CS, Medicine, Physics)",
" β’ Temporal robustness (train on old data, test on new)",
" β’ Author disambiguation and ORCID integration",
"",
"π Deployment",
" β’ Cloud deployment (AWS/Azure/Heroku)",
" β’ API for institutional integration",
" β’ Mobile application for researchers"
]
add_content_slide("π Future Enhancements", future_content, bullet_style=False)
# ========================================
# SLIDE 11: THANK YOU
# ========================================
slide_thanks = add_title_slide(
"Thank You!",
"Questions & Discussion"
)
# Add contact info
contact_box = slide_thanks.shapes.add_textbox(
Inches(0.5), Inches(5.5), Inches(9), Inches(1.5)
)
contact_frame = contact_box.text_frame
contact_frame.text = "Om Harsh - E23CSEU2423\nKshitiz Yadav - E23CSEU0338\n\nSmart India Hackathon 2024 | Chitkara University"
for p in contact_frame.paragraphs:
p.font.size = Pt(16)
p.font.color.rgb = TEXT_COLOR
p.alignment = PP_ALIGN.CENTER
# Save presentation
output_path = os.path.join(os.path.dirname(__file__), "Profyler_Presentation.pptx")
prs.save(output_path)
print(f"β
Presentation created successfully: {output_path}")
return output_path
if __name__ == "__main__":
try:
path = create_profyler_presentation()
print(f"\nπ PowerPoint presentation ready!")
print(f"π Location: {path}")
print(f"\nπ― Total slides: 11")
print(f" 1. Title Slide")
print(f" 2. Project Idea")
print(f" 3. Technical Approach (Flow Diagram)")
print(f" 4. Technology Stack")
print(f" 5. Novelty & Innovation")
print(f" 6. Feasibility & Viability")
print(f" 7. Impact & Benefits")
print(f" 8. Results & Metrics")
print(f" 9. System Demo")
print(f" 10. Future Enhancements")
print(f" 11. Thank You")
except Exception as e:
print(f"β Error creating presentation: {e}")
import traceback
traceback.print_exc()