Skip to content

Commit 287c8cd

Browse files
committed
refactor: 💡 path for images and svg
1 parent af4b2a0 commit 287c8cd

File tree

6 files changed

+85
-177
lines changed

6 files changed

+85
-177
lines changed

‎app/data/data.json‎

Lines changed: 24 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@
1010
"topic": "Safeguarding Large Language Models in Real-time with Tunable Safety-Performance Trade-offs",
1111
"image": "/images/maurodiaz.jpg",
1212
"advisor": "Jorge Poco",
13-
"description": "Large Language Models (LLMs) have been shown to be susceptible to jailbreak attacks, or adversarial attacks used to illicit high risk behavior from a model. Jailbreaks have been exploited by cybercriminals and blackhat actors to cause significant harm, highlighting the critical need to safeguard widely-deployed models. Safeguarding approaches, which include fine-tuning models or having LLMs 'self-reflect', may lengthen the inference time of a model, incur a computational penalty, reduce the semantic fluency of an output, and restrict 'normal' model behavior. Importantly, these Safety-Performance Trade-offs (SPTs) remain an understudied area. In this work, we introduce a novel safeguard, called SafeNudge, that combines Controlled Text Generation with 'nudging,' or using text interventions to change the behavior of a model. SafeNudge triggers during text-generation while a jailbreak attack is being executed, and can reduce successful jailbreak attempts by 30% by guiding the LLM towards a safe response. It adds minimal latency to inference and has a negligible impact on the semantic fluency of outputs. Further, we allow for tunable SPTs. SafeNudge is open-source and available through https://pypi.org/, and is compatible with models loaded with the Hugging Face transformers library."
13+
"description": "Large Language Models (LLMs) have been shown to be susceptible to jailbreak attacks, or adversarial attacks used to illicit high risk behavior from a model. Jailbreaks have been exploited by cybercriminals and blackhat actors to cause significant harm, highlighting the critical need to safeguard widely-deployed models. Safeguarding approaches, which include fine-tuning models or having LLMs 'self-reflect', may lengthen the inference time of a model, incur a computational penalty, reduce the semantic fluency of an output, and restrict 'normal' model behavior. Importantly, these Safety-Performance Trade-offs (SPTs) remain an understudied area. In this work, we introduce a novel safeguard, called SafeNudge, that combines Controlled Text Generation with 'nudging,' or using text interventions to change the behavior of a model. SafeNudge triggers during text-generation while a jailbreak attack is being executed, and can reduce successful jailbreak attempts by 30% by guiding the LLM towards a safe response. It adds minimal latency to inference and has a negligible impact on the semantic fluency of outputs. Further, we allow for tunable SPTs. SafeNudge is open-source and available through https://pypi.org/, and is compatible with models loaded with the Hugging Face transformers library.",
14+
"email": "email@gmail.com",
15+
"links": {
16+
"recording": true,
17+
"slides": true
18+
}
1419
}
1520
},
1621
{
@@ -21,7 +26,12 @@
2126
"topic": "Understanding, Enhancing, and Augmenting Human Interaction through Adaptive Systems",
2227
"image": "/images/andresdelapuente.jpeg",
2328
"advisor": "Jorge Poco",
24-
"description": "By leveraging computational methods, physiological sensing, and AI-driven adaptation, I develop intelligent interfaces that dynamically respond to users’ cognitive and behavioral states, optimizing experience and performance in real time. My work spans aviation, driving assistance, healthcare, and gaming, demonstrating the impact of adaptive systems across diverse domains."
29+
"description": "By leveraging computational methods, physiological sensing, and AI-driven adaptation, I develop intelligent interfaces that dynamically respond to users’ cognitive and behavioral states, optimizing experience and performance in real time. My work spans aviation, driving assistance, healthcare, and gaming, demonstrating the impact of adaptive systems across diverse domains.",
30+
"email": "email@gmail.com",
31+
"links": {
32+
"recording": true,
33+
"slides": true
34+
}
2535
}
2636
},
2737
{
@@ -32,7 +42,12 @@
3242
"topic": "Data Visualization for Large-Scale Text Data",
3343
"image": "/images/juanpabloheredia.png",
3444
"advisor": "Jorge Poco",
35-
"description": "By leveraging computational methods, physiological sensing, and AI-driven adaptation, I develop intelligent interfaces that dynamically respond to users’ cognitive and behavioral states, optimizing experience and performance in real time. My work spans aviation, driving assistance, healthcare, and gaming, demonstrating the impact of adaptive systems across diverse domains."
45+
"description": "By leveraging computational methods, physiological sensing, and AI-driven adaptation, I develop intelligent interfaces that dynamically respond to users’ cognitive and behavioral states, optimizing experience and performance in real time. My work spans aviation, driving assistance, healthcare, and gaming, demonstrating the impact of adaptive systems across diverse domains.",
46+
"email": "email@gmail.com",
47+
"links": {
48+
"recording": true,
49+
"slides": true
50+
}
3651
}
3752
},
3853
{
@@ -43,89 +58,13 @@
4358
"topic": "Topic Modelling for Large-Scale Text Data",
4459
"image": "/images/felipemoreno.png",
4560
"advisor": "Jorge Poco",
46-
"description": "By leveraging computational methods, physiological sensing, and AI-driven adaptation, I develop intelligent interfaces that dynamically respond to users’ cognitive and behavioral states, optimizing experience and performance in real time. My work spans aviation, driving assistance, healthcare, and gaming, demonstrating the impact of adaptive systems across diverse domains."
47-
}
48-
}
49-
],
50-
"upcoming_events": [
51-
{
52-
"date": "Mar 21, 2025",
53-
"time": "11:00 - 11:30",
54-
"location": "Fundacao Getulio Vargas, Praia de Botafogo, 190, 5th floor, Rio de Janeiro, RJ, Brazil",
55-
"speaker": "Juan Pablo Heredia",
56-
"topic": "Topic Modelling for Large-Scale Text Data"
57-
},
58-
{
59-
"date": "Mar 28, 2025",
60-
"time": "11:30 - 12:00",
61-
"location": "Fundacao Getulio Vargas, Praia de Botafogo, 190, 5th floor, Rio de Janeiro, RJ, Brazil",
62-
"speaker": "",
63-
"topic": ""
64-
}
65-
],
66-
"historical_events": [
67-
{
68-
"date": "Nov 6, 2024",
69-
"presentations": [
70-
{
71-
"speaker": "Teal Witter",
72-
"title": "Provably Accurate Estimators for Shapley Values",
73-
"links": {
74-
"recording": true,
75-
"slides": true
76-
}
77-
},
78-
{
79-
"speaker": "Niv Cohen",
80-
"title": "Discovering and Erasing Undesired Concepts",
81-
"links": {
82-
"recording": true,
83-
"slides": true
84-
}
85-
}
86-
]
87-
},
88-
{
89-
"date": "Nov 20, 2024",
90-
"presentations": [
91-
{
92-
"speaker": "Alexander Ratzan",
93-
"title": "Molecular Connectomics from Small to Large Brains",
94-
"links": {
95-
"recording": true,
96-
"slides": true
97-
}
98-
},
99-
{
100-
"speaker": "Felipe Inagaki de Oliveira",
101-
"title": "TopoMap++: A faster and more space efficient technique to compute projections with topological guarantees",
102-
"links": {
103-
"recording": true,
104-
"slides": true
105-
}
61+
"description": "By leveraging computational methods, physiological sensing, and AI-driven adaptation, I develop intelligent interfaces that dynamically respond to users’ cognitive and behavioral states, optimizing experience and performance in real time. My work spans aviation, driving assistance, healthcare, and gaming, demonstrating the impact of adaptive systems across diverse domains.",
62+
"email": "email@gmail.com",
63+
"links": {
64+
"recording": true,
65+
"slides": true
10666
}
107-
]
108-
},
109-
{
110-
"date": "Dec 4, 2024",
111-
"presentations": [
112-
{
113-
"speaker": "Guande Wu",
114-
"title": "Evaluating Collaborative Capabilities of Language Models",
115-
"links": {
116-
"recording": true,
117-
"slides": true
118-
}
119-
},
120-
{
121-
"speaker": "Aécio Santos",
122-
"title": "Sampling-Based Sketching Methods for Correlated Data Discovery",
123-
"links": {
124-
"recording": true,
125-
"slides": true
126-
}
127-
}
128-
]
67+
}
12968
}
13069
]
13170
}

‎app/page.tsx‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
TableHeader,
1212
TableRow,
1313
} from "@/components/ui/table";
14-
import { isFutureTalk, isRecentTalk } from "@/lib/utils";
14+
import { basePath, isFutureTalk, isRecentTalk } from "@/lib/utils";
1515

1616
export default function Home() {
1717
const [isExpanded, setIsExpanded] = useState(false);
@@ -30,11 +30,6 @@ export default function Home() {
3030
return text.length > 10;
3131
};
3232

33-
const basePath =
34-
process.env.NEXT_PUBLIC_BASE_PATH ||
35-
"https://visual-ds.github.io/group-seminar.github.io/";
36-
console.log("base Path", basePath);
37-
3833
return (
3934
<div className="max-w-7xl mx-auto text-gray-800 p-4">
4035
<h1 className="text-4xl font-bold text-center py-6">{data.title}</h1>

‎app/talks/page.tsx‎

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,37 @@
1+
import { isPastTalk } from "@/lib/utils";
12
import data from "../data/data.json";
23

34
export default function Page() {
4-
return (
5-
<div className="space-y-8 p-4">
6-
{data.historical_events.map((dateGroup, index) => (
7-
<div key={index} className="space-y-4">
8-
<h2 className="text-2xl font-bold">{dateGroup.date}</h2>
9-
10-
<div className="grid md:grid-cols-2 gap-4">
11-
{dateGroup.presentations.map((talk, talkIndex) => (
12-
<div
13-
key={talkIndex}
14-
className="p-4 rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-shadow"
15-
>
16-
<h3 className="text-lg font-semibold">
17-
{talk.speaker}: {talk.title}
18-
</h3>
19-
<div className="mt-3 space-x-4">
20-
{talk.links.recording && (
21-
<a
22-
href="#"
23-
className="text-blue-500 hover:text-blue-700"
24-
>
25-
Recording
26-
</a>
27-
)}
28-
{talk.links.slides && (
29-
<a
30-
href="#"
31-
className="text-blue-500 hover:text-blue-700"
32-
>
33-
Slides
34-
</a>
35-
)}
36-
</div>
37-
</div>
38-
))}
5+
const historical_events = data.group_seminar.filter((seminar) =>
6+
isPastTalk(seminar.date)
7+
);
8+
9+
return (
10+
<div className="space-y-8 p-4">
11+
{historical_events.map((dateGroup, index) => (
12+
<div key={index} className="space-y-4">
13+
<h2 className="text-2xl font-bold">{dateGroup.date}</h2>
14+
<div className="grid md:grid-cols-2 gap-4">
15+
<div className="p-4 rounded-lg border border-gray-200 shadow-sm hover:shadow-md transition-shadow">
16+
<h3 className="text-lg font-semibold">
17+
{dateGroup.speaker.name}: {dateGroup.speaker.topic}
18+
</h3>
19+
<div className="mt-3 space-x-4">
20+
{dateGroup.speaker.links.recording && (
21+
<a href="#" className="text-blue-500 hover:text-blue-700">
22+
Recording
23+
</a>
24+
)}
25+
{dateGroup.speaker.links.slides && (
26+
<a href="#" className="text-blue-500 hover:text-blue-700">
27+
Slides
28+
</a>
29+
)}
3930
</div>
4031
</div>
41-
))}
32+
</div>
4233
</div>
43-
);
44-
};
45-
34+
))}
35+
</div>
36+
);
37+
}

‎components/ui/sidebar.tsx‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Slot } from "@radix-ui/react-slot"
55
import { VariantProps, cva } from "class-variance-authority"
66

77
import { useIsMobile } from "@/hooks/use-mobile"
8-
import { cn } from "@/lib/utils"
8+
import { basePath, cn } from "@/lib/utils"
99
import { Button } from "@/components/ui/button"
1010
import { Input } from "@/components/ui/input"
1111
import { Separator } from "@/components/ui/separator"
@@ -17,7 +17,6 @@ import {
1717
TooltipProvider,
1818
TooltipTrigger,
1919
} from "@/components/ui/tooltip"
20-
import Image from "next/image"
2120

2221
const SIDEBAR_COOKIE_NAME = "sidebar_state"
2322
const SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7
@@ -278,11 +277,11 @@ const SidebarTrigger = React.forwardRef<
278277
}}
279278
{...props}
280279
>
281-
<Image
282-
src="/panel-left-icon.svg"
280+
<img
281+
src={`${basePath}/panel-left-icon.svg`}
283282
alt="Panel Left Icon"
284-
width={22}
285-
height={22}
283+
width={26}
284+
height={26}
286285
/>
287286
<span className="sr-only">Toggle Sidebar</span>
288287
</Button>

‎lib/utils.ts‎

Lines changed: 22 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,32 @@
1-
import { clsx, type ClassValue } from "clsx"
2-
import { twMerge } from "tailwind-merge"
1+
import { clsx, type ClassValue } from "clsx";
2+
import { twMerge } from "tailwind-merge";
3+
4+
export const basePath =
5+
process.env.NEXT_PUBLIC_BASE_PATH ||
6+
"https://visual-ds.github.io/group-seminar.github.io/";
7+
console.log("base Path", basePath);
38

49
export function cn(...inputs: ClassValue[]) {
5-
return twMerge(clsx(inputs))
10+
return twMerge(clsx(inputs));
611
}
712

8-
export function isRecentTalk(date: string) {
9-
const currentDate = new Date();
10-
const seminarDate = new Date(date);
11-
12-
const simplifiedCurrentDate = new Date(
13-
currentDate.getFullYear(),
14-
currentDate.getMonth(),
15-
currentDate.getDate()
16-
);
17-
18-
const simplifiedSeminarDate = new Date(
19-
seminarDate.getFullYear(),
20-
seminarDate.getMonth(),
21-
seminarDate.getDate()
22-
);
23-
24-
const isEqual = simplifiedSeminarDate.getTime() === simplifiedCurrentDate.getTime();
13+
function normalizeDate(date: string | Date): number {
14+
const parsedDate = new Date(date);
15+
return new Date(
16+
parsedDate.getFullYear(),
17+
parsedDate.getMonth(),
18+
parsedDate.getDate()
19+
).getTime();
20+
}
2521

26-
return isEqual;
22+
export function isRecentTalk(date: string) {
23+
return normalizeDate(date) === normalizeDate(new Date());
2724
}
2825

2926
export function isFutureTalk(date: string) {
30-
const currentDate = new Date();
31-
const seminarDate = new Date(date);
32-
33-
const simplifiedCurrentDate = new Date(
34-
currentDate.getFullYear(),
35-
currentDate.getMonth(),
36-
currentDate.getDate()
37-
);
38-
39-
const simplifiedSeminarDate = new Date(
40-
seminarDate.getFullYear(),
41-
seminarDate.getMonth(),
42-
seminarDate.getDate()
43-
);
44-
45-
const isFuture = simplifiedSeminarDate.getTime() > simplifiedCurrentDate.getTime();
46-
47-
return isFuture;
27+
return normalizeDate(date) > normalizeDate(new Date());
4828
}
4929

30+
export function isPastTalk(date: string) {
31+
return normalizeDate(date) < normalizeDate(new Date());
32+
}

‎next.config.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ const nextConfig: NextConfig = {
66
images: {
77
unoptimized: true,
88
},
9-
basePath: '/group-seminar.github.io',
10-
assetPrefix: '/group-seminar.github.io',
9+
// basePath: '/group-seminar.github.io',
10+
// assetPrefix: '/group-seminar.github.io',
1111
trailingSlash: true,
1212
};
1313

0 commit comments

Comments
 (0)