Skip to content

Commit

Permalink
Merge pull request #302 from singnet/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
raamb authored Sep 7, 2019
2 parents ef64009 + 94941c3 commit 083f634
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 16 deletions.
6 changes: 3 additions & 3 deletions src/assets/thirdPartyServices/snet/text_generation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ import AnchorLink from "../../../../components/common/AnchorLink";
const initialUserInput = {
start_text: "",
run_name: "trump",
temperature: 1.2,
temperature: 0.8,
top_k: 20,
length: 256,
};
Expand Down Expand Up @@ -326,8 +326,8 @@ class TextGenerationService extends React.Component {
value={top_k}
aria-labelledby="discrete-slider-always"
min={0}
max={100}
step={10}
max={20}
step={1}
valueLabelDisplay="on"
onChange={(e, val) => this.changeSlider("top_k", val)}
/>
Expand Down
12 changes: 8 additions & 4 deletions src/assets/thirdPartyServices/snet/text_generation/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const useStyles = theme => ({
},
infoIcon: {
paddingRight: 12,
display: "none",
color: theme.palette.text.lightGray,
verticalAlign: "middle",
},
Expand All @@ -38,7 +39,7 @@ export const useStyles = theme => ({
},
dropdown: {
"& > div": {
width: "86%",
width: "95%",
"& label": {
fontFamily: theme.typography.primary,
color: theme.palette.text.darkShadedGray,
Expand Down Expand Up @@ -98,9 +99,9 @@ export const useStyles = theme => ({
lineHeight: "24px",
textAlign: "center",
},
errorMsg: { margin: "25px 0 10px" },
errorMsg: { margin: "25px 0 0" },
btnContainer: {
marginTop: 40,
marginTop: 30,
textAlign: "center",
"& button": {
"&:first-of-type": { padding: "13px 0 11px" },
Expand All @@ -119,7 +120,10 @@ export const useStyles = theme => ({
alignItems: "center",
justifyContent: "space-between",
"& h4": { fontSize: "20 !important" },
"& svg": { color: theme.palette.text.lightShadedGray },
"& svg": {
display: "none",
color: theme.palette.text.lightShadedGray,
},
},
resultsContent: {
padding: "20px 0 90px",
Expand Down
11 changes: 4 additions & 7 deletions src/assets/thirdPartyServices/snet/topic_analysis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ export default class TopicAnalysisService extends React.Component {
const link = document.createElement("a");
link.setAttribute("type", "hidden");
let resp = this.state.response;
resp["handle"] = "https://tz-services-1.snet.sh:2298/topic-analysis/api/v1.0/results?handle=" + resp["handle"];
// Concatenation already done in the render complete method
//resp["handle"] = "https://tz-services-1.snet.sh:2298/topic-analysis/api/v1.0/results?handle=" + resp["handle"];
link.setAttribute("href", "data:text/json," + JSON.stringify(resp));
link.setAttribute("download", "result.json");
document.body.appendChild(link);
Expand Down Expand Up @@ -370,13 +371,9 @@ export default class TopicAnalysisService extends React.Component {
<a
rel="noopener noreferrer"
target="_blank"
href={
"https://tz-services-1.snet.sh:2298/topic-analysis/api/v1.0/results?handle=" +
response.handle
}
href={response.handle}
>
{"https://tz-services-1.snet.sh:2298/topic-analysis/api/v1.0/results?handle=" +
response.handle}
{response.handle}
</a>
</p>
</CardContent>
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/StyledMenu/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Fragment, useState } from "react";
import Button from "@material-ui/core/Button";
import Menu from "@material-ui/core/Menu";
import MenuItem from "@material-ui/core/MenuItem";
import { withStyles } from "@material-ui/core/styles";
import { withStyles } from "@material-ui/styles";
import CaretIcon from "@material-ui/icons/ArrowDropDown";

import { useStyles } from "./styles";
Expand All @@ -26,7 +26,7 @@ const StyledMenu = ({ classes, label, list }) => {
</div>
<Menu anchorEl={anchorEl} id="simple-menu" open={Boolean(anchorEl)} onClose={handleClose}>
{list.map(item => (
<MenuItem key={item.label}>
<MenuItem key={item.label} className={classes.menuItem}>
<AnchorLink label={item.label} href={item.link} newTab={item.newTab} />
</MenuItem>
))}
Expand Down
3 changes: 3 additions & 0 deletions src/components/common/StyledMenu/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ export const useStyles = theme => ({
textTransform: "none",
},
},
menuItem: {
fontFamily: theme.typography.primary.main,
},
});

0 comments on commit 083f634

Please sign in to comment.