Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b182da4

Browse files
Merge pull request #76 from jeffshek/add-company-mission-statements
Add Company/Mission Statements
2 parents df794ef + cd03f6e commit b182da4

File tree

4 files changed

+35
-8
lines changed

4 files changed

+35
-8
lines changed

‎src/components/MainComponent/Main.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,16 @@ import moment from "moment";
2222
import { LinearIndeterminate } from "components/Loading";
2323
import { SettingsModal } from "components/Modals/SettingsModal";
2424
import {
25+
COMPANY_PROMPTS_TO_USE,
2526
GOT_PROMPTS_TO_USE,
2627
GPT2_LARGE_MODEL_NAME,
28+
GPT2_MEDIUM_COMPANIES_MODEL_NAME,
2729
GPT2_MEDIUM_GOT_MODEL_NAME,
2830
GPT2_MEDIUM_HP_MODEL_NAME,
2931
GPT2_MEDIUM_LEGAL_MODEL_NAME,
3032
GPT2_MEDIUM_LYRICS_MODEL_NAME,
3133
GPT2_MEDIUM_MODEL_NAME,
3234
GPT2_MEDIUM_RESEARCH_MODEL_NAME,
33-
GPT2_SMALL_MODEL_NAME,
3435
HP_PROMPTS_TO_USE,
3536
LEGAL_PROMPTS_TO_USE,
3637
PROMPTS_TO_USE,
@@ -96,6 +97,7 @@ export class _MainComponent extends React.Component {
9697
// 45 words felt like a good number, 17 just loads way faster
9798
// 25 to see how this works for the time being ..
9899
let length = 25;
100+
let batch_size = 7;
99101

100102
if (pathname === "/legal") {
101103
model_name = GPT2_MEDIUM_LEGAL_MODEL_NAME;
@@ -112,6 +114,10 @@ export class _MainComponent extends React.Component {
112114
model_name = GPT2_MEDIUM_RESEARCH_MODEL_NAME;
113115
} else if (pathname === "/lyrics") {
114116
model_name = GPT2_MEDIUM_LYRICS_MODEL_NAME;
117+
} else if (pathname === "/companies") {
118+
model_name = GPT2_MEDIUM_COMPANIES_MODEL_NAME;
119+
// these are much smaller, so show more options
120+
batch_size = 10;
115121
}
116122

117123
const textPrompts = [];
@@ -154,7 +160,7 @@ export class _MainComponent extends React.Component {
154160
top_p: 0,
155161

156162
length: length,
157-
batch_size: 7, // having higher batch sizes doesn't slow it down much
163+
batch_size: batch_size, // having higher batch sizes doesn't slow it down much
158164

159165
// modals
160166
loginOrRegisterModal: false,
@@ -705,6 +711,8 @@ export class _MainComponent extends React.Component {
705711
prompts = HP_PROMPTS_TO_USE;
706712
} else if (this.state.model_name === GPT2_MEDIUM_RESEARCH_MODEL_NAME) {
707713
prompts = RESEARCH_PROMPTS_TO_USE;
714+
} else if (this.state.model_name === GPT2_MEDIUM_COMPANIES_MODEL_NAME) {
715+
prompts = COMPANY_PROMPTS_TO_USE;
708716
}
709717

710718
const randomPrompt = getRandomItemFromArray(prompts);
@@ -898,7 +906,7 @@ export class _MainComponent extends React.Component {
898906
}}
899907
onChange={this.onSelectChange}
900908
>
901-
<MenuItem value={GPT2_SMALL_MODEL_NAME}>General (Basic)</MenuItem>
909+
{/*<MenuItem value={GPT2_SMALL_MODEL_NAME}>General (Basic)</MenuItem>*/}
902910
<MenuItem value={GPT2_MEDIUM_MODEL_NAME}>General (Medium)</MenuItem>
903911
<MenuItem value={GPT2_LARGE_MODEL_NAME}>
904912
General (Advanced)
@@ -914,6 +922,9 @@ export class _MainComponent extends React.Component {
914922
<MenuItem value={GPT2_MEDIUM_LYRICS_MODEL_NAME}>
915923
Song Lyrics
916924
</MenuItem>
925+
<MenuItem value={GPT2_MEDIUM_COMPANIES_MODEL_NAME}>
926+
Mission Statements
927+
</MenuItem>
917928
</Select>
918929
<FormHelperText>Writing Style</FormHelperText>
919930
</FormControl>

‎src/components/MainComponent/constants.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export const GPT2_MEDIUM_GOT_MODEL_NAME = "gpt2-medium-got";
1010
export const GPT2_MEDIUM_HP_MODEL_NAME = "gpt2-medium-hp";
1111
export const GPT2_MEDIUM_RESEARCH_MODEL_NAME = "gpt2-medium-research";
1212
export const GPT2_MEDIUM_LYRICS_MODEL_NAME = "gpt2-medium-lyrics";
13+
export const GPT2_MEDIUM_COMPANIES_MODEL_NAME = "gpt2-medium-companies";
1314

1415
export const GPT2_LARGE_MODEL_NAME = "gpt2-large";
1516

@@ -103,5 +104,18 @@ export const RESEARCH_PROMPTS_TO_USE = [
103104
"Significant enhancement in ",
104105
"In order to improve the "
105106
];
107+
108+
export const COMPANY_PROMPTS_TO_USE = [
109+
"Ferocious Caterpillar's founder vision was ",
110+
"WaterFaucet.AI's mission is to ",
111+
"Decaffeinated Water aims to ",
112+
"RoundSquare innovates ",
113+
"Invisible Mirror demonstrates ",
114+
"Sturdy Knockoff has patented the ",
115+
"Zapdos is the award-winning electric ",
116+
"Articuno's team has ",
117+
"Bulbausaur AI is a plant-based ",
118+
"BoringPotatos is disrupting the "
119+
];
106120
// use this as a way to back slatejs back to focus on where to add the comment
107121
export const SPECIAL_CHARACTERS = [",", "!", ".", '"', "-", "'", """];

‎src/components/Modals/SettingsModal.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ import MenuItem from "@material-ui/core/MenuItem";
1010
import FormControl from "@material-ui/core/FormControl";
1111
import {
1212
GPT2_LARGE_MODEL_NAME,
13+
GPT2_MEDIUM_COMPANIES_MODEL_NAME,
1314
GPT2_MEDIUM_GOT_MODEL_NAME,
1415
GPT2_MEDIUM_HP_MODEL_NAME,
1516
GPT2_MEDIUM_LEGAL_MODEL_NAME,
1617
GPT2_MEDIUM_LYRICS_MODEL_NAME,
1718
GPT2_MEDIUM_MODEL_NAME,
18-
GPT2_MEDIUM_RESEARCH_MODEL_NAME,
19-
GPT2_SMALL_MODEL_NAME
19+
GPT2_MEDIUM_RESEARCH_MODEL_NAME
2020
} from "components/MainComponent/constants";
2121
import Grid from "@material-ui/core/Grid";
2222

@@ -175,9 +175,6 @@ export const SettingsModal = ({
175175
}}
176176
onChange={onSelectChange}
177177
>
178-
<MenuItem value={GPT2_SMALL_MODEL_NAME}>
179-
GPT2 (Small, Fastest)
180-
</MenuItem>
181178
<MenuItem value={GPT2_MEDIUM_LEGAL_MODEL_NAME}>
182179
GPT2 (Law/Legal Writing Style)
183180
</MenuItem>
@@ -194,9 +191,13 @@ export const SettingsModal = ({
194191
<MenuItem value={GPT2_MEDIUM_GOT_MODEL_NAME}>
195192
Game of Thrones
196193
</MenuItem>
194+
197195
<MenuItem value={GPT2_MEDIUM_LYRICS_MODEL_NAME}>
198196
Song Lyrics
199197
</MenuItem>
198+
<MenuItem value={GPT2_MEDIUM_COMPANIES_MODEL_NAME}>
199+
Company/Product Vision
200+
</MenuItem>
200201
</Select>
201202
</FormControl>
202203
</Grid>

‎src/routes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default props => (
1212
<Route exact path="/hp" component={MainComponent} />
1313
<Route exact path="/got" component={MainComponent} />
1414
<Route exact path="/lyrics" component={MainComponent} />
15+
<Route exact path="/companies" component={MainComponent} />
1516
<Route exact path="/research" component={MainComponent} />
1617
<Route exact path="/prompts/:uuid/" component={PublishedPromptComponent} />
1718
<Route exact path="/best/" component={BestPromptsComponent} />

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /