Skip to content

Commit 3982787

Browse files
committed
update base path for ui build
1 parent de28cc4 commit 3982787

File tree

7 files changed

+23
-21
lines changed

7 files changed

+23
-21
lines changed

neuralqa/config_default.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ retriever:
6262
value: "none"
6363
type: "none"
6464

65+
6566
# - name: Case Law
6667
# value: cases
6768
# host: localhost
@@ -131,7 +132,7 @@ expander:
131132

132133
# optional selection of samples to show in the UI
133134
samples:
134-
- question: "what is the goal of the fourth amendment? "
135+
- question: "what is the goal of the fourth amendment?"
135136
context:
136137
The Fourth Amendment of the U.S. Constitution provides that the right of
137138
the people to be secure in their persons, houses, papers, and effects, against

neuralqa/server/ui/src/components/Main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Main extends Component {
5454

5555
this.serverBasePath =
5656
window.location.protocol + "//" + window.location.host;
57-
this.serverBasePath = "http://localhost:5000";
57+
// this.serverBasePath = "http://localhost:5000";
5858
this.configEndpoint = "/api/config";
5959
}
6060

neuralqa/server/ui/src/components/expandview/ExpandView.jsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,23 +132,29 @@ class ExpandView extends Component {
132132
<div className="smalldesc underline pb3">
133133
<div className="tooltip iblock mr5">
134134
{expansionData.pos}
135-
<span className="tooltiptext lhmedium">
136-
{expansionData.pos_desc}
135+
<span className="tooltiptext">
136+
<div className="underline boldtext pb3 mb5">
137+
Part&nbsp;of&nbsp;Speech
138+
</div>
139+
<div> {expansionData.pos_desc}</div>
137140
</span>
138141
</div>
139142
<div className="tooltip iblock">
140143
{expansionData.named_entity !== ""
141144
? "| " + expansionData.named_entity
142145
: ""}
143-
<span className="tooltiptext lhmedium">
144-
{expansionData.ent_desc}
146+
<span className="tooltiptext ">
147+
<div className="underline boldtext pb3 mb5">
148+
Named&nbsp;Entity
149+
</div>
150+
<div> {expansionData.ent_desc}</div>
145151
</span>
146152
</div>
147153
</div>
148154

149155
<div
150156
id={"term" + index}
151-
className="termbox mt10"
157+
className={"termbox mt10 " + (terms.length > 0 ? "mb5" : "")}
152158
style={{
153159
color: terms.length > 0 ? "white" : "",
154160
backgroundColor: boxColor,

neuralqa/server/ui/src/components/expandview/expandview.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
.tooltip {
3131
position: relative;
3232
display: inline-block;
33-
/* cursor: pointer; */
33+
cursor: default;
3434
}
3535

3636
.tooltip .tooltiptext {

neuralqa/server/ui/src/components/explainview/explainview.css

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,11 @@
2020
background-color: rgb(235, 235, 235);
2121
}
2222

23-
.expview {
24-
/* min-height: 450px; */
25-
/* border: 2px solid black; */
26-
}
27-
2823
.brushbox {
2924
/* border: 1px solid green; */
3025
width: 100%;
3126
}
32-
.graphsvgbox {
33-
/* border: 1px solid green; */
34-
}
27+
3528
.graphsvgpath {
3629
/* transform: rotate(90deg); */
3730
fill: #686868;

neuralqa/server/ui/src/components/queryview/QueryView.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class QueryView extends Component {
7373

7474
this.serverBasePath =
7575
window.location.protocol + "//" + window.location.host;
76-
this.serverBasePath = "http://localhost:5000";
76+
// this.serverBasePath = "http://localhost:5000";
7777
this.passageEndpoint = "/api/documents";
7878
this.answerEndpoint = "/api/answers";
7979
this.explainEndpoint = "/api/explain";
@@ -186,7 +186,7 @@ class QueryView extends Component {
186186
this.setState({
187187
answers: data,
188188
errorStatus: "",
189-
// expansions: data.query,
189+
expansions: null,
190190
});
191191
setTimeout(() => {
192192
this.setState({ answerIsLoading: false });
@@ -852,7 +852,7 @@ class QueryView extends Component {
852852
size="field"
853853
>
854854
{" "}
855-
Expand
855+
Expand Query?
856856
</Button>
857857
)}
858858
<Button

neuralqa/server/ui/src/components/template.css

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@
7979
.lhmedium {
8080
line-height: 1rem;
8181
}
82-
82+
.lhsmall {
83+
line-height: 0.8rem;
84+
}
8385
.smalldesc {
8486
font-size: 0.72em;
8587
}
@@ -307,7 +309,7 @@
307309
.opacity0 {
308310
opacity: 0;
309311
}
310-
.transition3s {
312+
.transitiono3s {
311313
transition: opacity 0.3s ease-in-out;
312314
-moz-transition: opacity 0.3s ease-in-out;
313315
-webkit-transition: opacity 0.3s ease-in-out;

0 commit comments

Comments
 (0)