Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrumilp15 committed Sep 20, 2020
1 parent 6e09b20 commit 1ebb72f
Show file tree
Hide file tree
Showing 5 changed files with 253 additions and 44 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*

*.gif
123 changes: 123 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"konva": "^7.1.3",
"react": "^16.13.1",
"react-art": "^16.13.1",
"react-dom": "^16.13.1",
"react-konva": "^16.13.0-6",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.3",
"styled-components": "^5.2.0"
Expand Down
83 changes: 48 additions & 35 deletions src/components/calculate/index.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
import React, { useState } from "react";
import styled from "styled-components";
import CalculateComponent from './calculateComponent';
import CalculateComponent from "./calculateComponent";

const CalculateContainer = styled.div`
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #83D86F;
min-height: 70vh;
padding: 10vh 0 10vh 0;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #83d86f;
min-height: 70vh;
padding: 10vh 0 10vh 0;
`;

const ComponentContainer = styled.div`
width: 80%;
display: flex;
flex-direction: column;
align-items: flex-start;
width: 80%;
display: flex;
flex-direction: column;
align-items: flex-start;
`;

const CalculateTitle = styled.h1`
color: white;
font-size: 4rem;
font-weight: bold;
margin-bottom: 20px;
color: white;
font-size: 4rem;
font-weight: bold;
margin-bottom: 20px;
`;

const CalculateDescription = styled.p`
color: white;
font-size: 1.75rem;
text-align: justify;
text-justify: auto;
color: white;
font-size: 1.75rem;
text-align: justify;
text-justify: auto;
`;

const CalculateA = styled.a`
color: white;
color: white;
`;

const Sub = styled.sub`
Expand All @@ -43,19 +43,32 @@ const Sub = styled.sub`
`;

function Calculate() {
const [step, setStep] = useState(1);

return (
<CalculateContainer>
<ComponentContainer>
<CalculateTitle>Calculate Your Impact</CalculateTitle>
<CalculateDescription>Find the carbon impact of a machine learning model computation by indicating indicating relevant configuration options.</CalculateDescription>
<br />
<CalculateDescription>Data obtained from <CalculateA href="https://iq.opengenus.org/floating-point-operations-per-second-flops-of-machine-learning-models/">OpenGenus IQ</CalculateA> and <CalculateA href="https://github.com/mlco2/impact/tree/master/data">MLCO<Sub>2</Sub> Impact</CalculateA>.</CalculateDescription>
<CalculateComponent step={step} setStep={setStep} />
</ComponentContainer>
</CalculateContainer>
)
const [step, setStep] = useState(1);

return (
<CalculateContainer>
<ComponentContainer>
<CalculateTitle>Calculate Your Impact</CalculateTitle>
<CalculateDescription>
Find the carbon impact of a machine learning model computation by
indicating indicating relevant configuration options.
</CalculateDescription>
<br />
<CalculateDescription>
Calculated using data from{" "}
<CalculateA href="https://iq.opengenus.org/floating-point-operations-per-second-flops-of-machine-learning-models/">
OpenGenus IQ
</CalculateA>{" "}
and{" "}
<CalculateA href="https://github.com/mlco2/impact/tree/master/data">
MLCO<Sub>2</Sub> Impact
</CalculateA>
.
</CalculateDescription>
<CalculateComponent step={step} setStep={setStep} />
</ComponentContainer>
</CalculateContainer>
);
}

export default Calculate;
export default Calculate;
Loading

0 comments on commit 1ebb72f

Please sign in to comment.