Skip to content

Commit 944c87a

Browse files
committed
show / hide
1 parent 3be0222 commit 944c87a

File tree

1 file changed

+32
-9
lines changed

1 file changed

+32
-9
lines changed

src/components/DemoPage.jsx

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import Carousel from './Carousel';
44
import App from '../App';
55
import dynamicData from '../data/dynamicData.json';
66
import { DynamicDataProvider } from '../context/DynamicDataContext';
7-
import { FaFileAlt, FaGithub } from 'react-icons/fa'; // Updated icons
7+
import { FaFileAlt, FaGithub, FaAngleDown, FaAngleUp } from 'react-icons/fa'; // Updated icons and arrow icons
88
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter';
99
import { atomDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
1010

1111
const DemoPage = () => {
1212
const [selectedHour, setSelectedHour] = useState(13); // Default to 1 PM
13+
const [abstractExpanded, setAbstractExpanded] = useState(false); // State for abstract toggle
1314

1415
// Ensure we match the key type in dynamicData (keys as strings)
1516
const currentData = dynamicData[selectedHour.toString()] || { carousel: [], suggestions: [], activity: "" };
@@ -18,6 +19,10 @@ const DemoPage = () => {
1819
setSelectedHour(newHour);
1920
};
2021

22+
const toggleAbstract = () => {
23+
setAbstractExpanded(!abstractExpanded);
24+
};
25+
2126
const codeString = `from dotenv import load_dotenv
2227
load_dotenv()
2328
@@ -106,16 +111,34 @@ except KeyboardInterrupt:
106111
<h3 style={{
107112
color: 'var(--color-main-text)',
108113
margin: '0 0 15px 0',
109-
fontSize: '20px',
110-
fontWeight: '600',
111114
textAlign: 'center',
112-
width: '100%'
113-
}}>
114-
Abstract
115+
width: 'auto',
116+
display: 'inline-flex',
117+
alignItems: 'center',
118+
justifyContent: 'center',
119+
cursor: 'pointer',
120+
padding: '8px 16px',
121+
borderRadius: '6px',
122+
backgroundColor: 'rgba(255, 255, 255, 0.05)',
123+
border: '1px solid rgba(255, 255, 255, 0.1)',
124+
transition: 'all 0.2s ease',
125+
boxShadow: '0 2px 5px rgba(0, 0, 0, 0.1)',
126+
}}
127+
onClick={toggleAbstract}
128+
onMouseOver={(e) => e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.1)'}
129+
onMouseOut={(e) => e.currentTarget.style.backgroundColor = 'rgba(255, 255, 255, 0.05)'}
130+
>
131+
{abstractExpanded ? 'Hide Abstract' : 'Show Abstract'}
132+
{abstractExpanded ?
133+
<FaAngleUp style={{ marginLeft: '8px' }} /> :
134+
<FaAngleDown style={{ marginLeft: '8px' }} />
135+
}
115136
</h3>
116-
<p className="abstract-paragraph">
117-
Human-computer interaction has long imagined technology that understands us—from our preferences and habits, to the timing and purpose of our everyday actions. Yet current user models remain fragmented, narrowly tailored to specific applications, and incapable of the flexible, cross-context reasoning required to fulfill these visions. This paper presents an architecture for a general user model (GUM) that can be used by any application. The GUM takes as input any unstructured observation of a user (e.g., device screenshots) and constructs confidence-weighted natural language propositions that capture that user's behavior, knowledge, beliefs, and preferences. GUMs can infer that a user is preparing for a wedding they're attending from a message thread with a friend. Or recognize that a user is struggling with a collaborator's feedback on a draft paper by observing multiple stalled edits and a switch to reading related work. GUMs introduce an architecture that infers new propositions about a user from multimodal observations, retrieves related propositions for context, and continuously revises existing propositions. To illustrate the breadth of applications that GUMs enable, we demonstrate how they augment chat-based assistants with contextual understanding, manage OS notifications to surface important information only when needed, and enable interactive agents that adapt to user preferences across applications. We also instantiate a new class of proactive assistants (GUMBOs) that discover and execute useful suggestions on a user's behalf based on the their GUM. In our evaluations, we find that GUMs make calibrated and accurate inferences about users, and that assistants built on GUMs proactively identify and perform actions of meaningful value that users wouldn't think to request explicitly. From observing a user coordinating a move with their roommate, GUMBO worked backward from the user's move-in date and budget, generated a personalized schedule with logistical to-dos, and recommended helpful moving services. Altogether, GUMs introduce new methods that leverage large multimodal models to understand unstructured user context—enabling both long-standing visions of HCI and entirely new interactive systems that anticipate user needs.
118-
</p>
137+
{abstractExpanded && (
138+
<p className="abstract-paragraph">
139+
Human-computer interaction has long imagined technology that understands us—from our preferences and habits, to the timing and purpose of our everyday actions. Yet current user models remain fragmented, narrowly tailored to specific applications, and incapable of the flexible, cross-context reasoning required to fulfill these visions. This paper presents an architecture for a general user model (GUM) that can be used by any application. The GUM takes as input any unstructured observation of a user (e.g., device screenshots) and constructs confidence-weighted natural language propositions that capture that user's behavior, knowledge, beliefs, and preferences. GUMs can infer that a user is preparing for a wedding they're attending from a message thread with a friend. Or recognize that a user is struggling with a collaborator's feedback on a draft paper by observing multiple stalled edits and a switch to reading related work. GUMs introduce an architecture that infers new propositions about a user from multimodal observations, retrieves related propositions for context, and continuously revises existing propositions. To illustrate the breadth of applications that GUMs enable, we demonstrate how they augment chat-based assistants with contextual understanding, manage OS notifications to surface important information only when needed, and enable interactive agents that adapt to user preferences across applications. We also instantiate a new class of proactive assistants (GUMBOs) that discover and execute useful suggestions on a user's behalf based on the their GUM. In our evaluations, we find that GUMs make calibrated and accurate inferences about users, and that assistants built on GUMs proactively identify and perform actions of meaningful value that users wouldn't think to request explicitly. From observing a user coordinating a move with their roommate, GUMBO worked backward from the user's move-in date and budget, generated a personalized schedule with logistical to-dos, and recommended helpful moving services. Altogether, GUMs introduce new methods that leverage large multimodal models to understand unstructured user context—enabling both long-standing visions of HCI and entirely new interactive systems that anticipate user needs.
140+
</p>
141+
)}
119142
</div>
120143

121144
<div style={{

0 commit comments

Comments
 (0)