Skip to content

Commit

Permalink
Merge pull request #357 from RichSomeday222/fixLoading
Browse files Browse the repository at this point in the history
Fix loading
  • Loading branch information
HarryLuUMN authored Oct 29, 2024
2 parents 0bdaeb3 + ba3d0a1 commit 05a6589
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
# GNN101: Visual Learning of Graph Neural Networks in Your Web Browser

![githubPre-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/799cc2e1-7443-4d53-ac89-f1d62ed813df)

Team: Yilin(Harry) Lu, Chongwei Chen, Matthew Xu, Qianwen Wang

GNN101 is a web-based tool that provides visual learning experience for the graph neural networks.

GiHub Page Version: https://Visual-Intelligence-UMN.github.io/GNN-101

## Getting Started

Expand Down
13 changes: 9 additions & 4 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ export const inter3 = Inter({
});

const LoadingSpinner = () => (
<div className="fixed top-0 left-0 w-full h-full flex items-center justify-center bg-white bg-opacity-75 z-50">
<div className="fixed top-0 left-0 w-full h-full flex flex-col items-center justify-center bg-white bg-opacity-75 z-50">
<div className="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"></div>
<p className="mt-4 text-gray-700 text-lg">Loading the visualization...</p>
</div>
);
);

export default function Home() {
const [isLoading, setIsLoading] = useState(false);
Expand Down Expand Up @@ -161,7 +162,7 @@ export default function Home() {
onExit={() => { }}
ref={introRef}
/>
{/* {isLoading && <LoadingSpinner />} */}
{isLoading && model.includes("link prediction") && <LoadingSpinner />}
<main className={inter.className}>
<div className={inter2.className}>
{step === 0 && (
Expand Down Expand Up @@ -464,7 +465,11 @@ export default function Home() {
}
setSimulation={setSimulation}
innerComputationMode={modelType}
onLoadComplete={() => setIsLoading(false)}
onLoadComplete={() => {
if (model.includes("link prediction")) {
setIsLoading(false);
}
}}
/>
</>
) : (
Expand Down

0 comments on commit 05a6589

Please sign in to comment.