Spaces:
Runtime error
Runtime error
Update
Browse files- react-qa/build/asset-manifest.json +6 -6
- react-qa/build/index.html +1 -1
- react-qa/build/static/css/{main.94510c01.css β main.572222cd.css} +2 -2
- react-qa/build/static/css/main.572222cd.css.map +1 -0
- react-qa/build/static/css/main.94510c01.css.map +0 -1
- react-qa/build/static/js/{main.c81f1cea.js β main.c56dfbe5.js} +0 -0
- react-qa/build/static/js/{main.c81f1cea.js.LICENSE.txt β main.c56dfbe5.js.LICENSE.txt} +0 -0
- react-qa/build/static/js/{main.c81f1cea.js.map β main.c56dfbe5.js.map} +0 -0
- react-qa/package-lock.json +8 -7
- react-qa/package.json +2 -1
- react-qa/src/App.js +12 -6
react-qa/build/asset-manifest.json
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
{
|
2 |
"files": {
|
3 |
-
"main.css": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.
|
4 |
-
"main.js": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.
|
5 |
"static/js/787.e7ee5088.chunk.js": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/787.e7ee5088.chunk.js",
|
6 |
"index.html": "/embed/p208p2002/Transformer-QA-Decode-Visualize/index.html",
|
7 |
-
"main.
|
8 |
-
"main.
|
9 |
"787.e7ee5088.chunk.js.map": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/787.e7ee5088.chunk.js.map"
|
10 |
},
|
11 |
"entrypoints": [
|
12 |
-
"static/css/main.
|
13 |
-
"static/js/main.
|
14 |
]
|
15 |
}
|
|
|
1 |
{
|
2 |
"files": {
|
3 |
+
"main.css": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.572222cd.css",
|
4 |
+
"main.js": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.c56dfbe5.js",
|
5 |
"static/js/787.e7ee5088.chunk.js": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/787.e7ee5088.chunk.js",
|
6 |
"index.html": "/embed/p208p2002/Transformer-QA-Decode-Visualize/index.html",
|
7 |
+
"main.572222cd.css.map": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.572222cd.css.map",
|
8 |
+
"main.c56dfbe5.js.map": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.c56dfbe5.js.map",
|
9 |
"787.e7ee5088.chunk.js.map": "/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/787.e7ee5088.chunk.js.map"
|
10 |
},
|
11 |
"entrypoints": [
|
12 |
+
"static/css/main.572222cd.css",
|
13 |
+
"static/js/main.c56dfbe5.js"
|
14 |
]
|
15 |
}
|
react-qa/build/index.html
CHANGED
@@ -1 +1 @@
|
|
1 |
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/embed/p208p2002/Transformer-QA-Decode-Visualize/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/embed/p208p2002/Transformer-QA-Decode-Visualize/logo192.png"/><link rel="manifest" href="/embed/p208p2002/Transformer-QA-Decode-Visualize/manifest.json"/><title>React App</title><script defer="defer" src="/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.
|
|
|
1 |
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/embed/p208p2002/Transformer-QA-Decode-Visualize/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/embed/p208p2002/Transformer-QA-Decode-Visualize/logo192.png"/><link rel="manifest" href="/embed/p208p2002/Transformer-QA-Decode-Visualize/manifest.json"/><title>React App</title><script defer="defer" src="/embed/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.c56dfbe5.js"></script><link href="/embed/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.572222cd.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
react-qa/build/static/css/{main.94510c01.css β main.572222cd.css}
RENAMED
@@ -1,2 +1,2 @@
|
|
1 |
-
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.position-relative{position:relative}.align-to-parent{left:0;position:absolute;top:0;width:100%}.span-hl-container{color:transparent}.span-hl-container hl{background-color:gray;pointer-events:auto}.op-10{opacity:.55}.op-9{opacity:.25}.op-8{opacity:.15}.op-7{opacity:.05}.op-6{opacity:.03}.op-1,.op-2,.op-3,.op-4,.op-5{opacity:.02}.bg-block{content:"\200D";display:inline-block;height:100%;left:0;position:absolute;top:0;width:100%}ul.hl-list{list-style-type:none;margin:0;padding-left:0}
|
2 |
-
/*# sourceMappingURL=main.
|
|
|
1 |
+
body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:0}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}.position-relative{position:relative}.align-to-parent{left:0;position:absolute;top:0;width:100%}.hl-layer-container{line-height:26px}.span-hl-container{color:transparent}.span-hl-container hl{background-color:gray;pointer-events:auto}.op-10{opacity:.55}.op-9{opacity:.25}.op-8{opacity:.15}.op-7{opacity:.05}.op-6{opacity:.03}.op-1,.op-2,.op-3,.op-4,.op-5{opacity:.02}.bg-block{content:"\200D";display:inline-block;height:100%;left:0;position:absolute;top:0;width:100%}ul.hl-list{list-style-type:none;margin:0;padding-left:0}ul.hl-list li{height:20px;line-height:20px;position:relative}
|
2 |
+
/*# sourceMappingURL=main.572222cd.css.map*/
|
react-qa/build/static/css/main.572222cd.css.map
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"version":3,"file":"static/css/main.572222cd.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CCZA,mBACE,iBACF,CAGA,iBAGE,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAEN,UACF,CAEA,oBACE,gBACF,CAEA,mBACE,iBACF,CAEA,sBAEE,qBAAsB,CADtB,mBAEF,CAEA,OACE,WACF,CAEA,MACE,WACF,CAEA,MACE,WACF,CAEA,MACE,WACF,CAEA,MACE,WAEF,CAEA,8BAKE,WACF,CAEA,UAIE,eAAgB,CAHhB,oBAAqB,CAErB,WAAY,CAIZ,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAJN,UAMF,CAEA,WACE,oBAAqB,CAErB,QAAS,CADT,cAEF,CAEA,cAEE,WAAY,CADZ,gBAAiB,CAEjB,iBACF","sources":["index.css","../node_modules/react-transformer-qa-decode-visualize/dist/index.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".position-relative {\n position: relative;\n}\n\n\n.align-to-parent {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n\n.hl-layer-container{\n line-height: 26px;\n}\n\n.span-hl-container {\n color: rgba(0, 0, 0, 0);\n}\n\n.span-hl-container hl {\n pointer-events: auto;\n background-color: gray;\n}\n\n.op-10 {\n opacity: 0.55;\n}\n\n.op-9 {\n opacity: 0.25;\n}\n\n.op-8 {\n opacity: 0.15;\n}\n\n.op-7 {\n opacity: 0.05;\n}\n\n.op-6 {\n opacity: 0.03;\n\n}\n\n.op-5,\n.op-4,\n.op-3,\n.op-2,\n.op-1 {\n opacity: 0.02;\n}\n\n.bg-block {\n display: inline-block;\n width: 100%;\n height: 100%;\n content: \"\\200D\";\n position: absolute;\n top: 0;\n left: 0;\n}\n\nul.hl-list {\n list-style-type: none;\n padding-left: 0;\n margin: 0;\n}\n\nul.hl-list li{\n line-height: 20px;\n height: 20px;\n position: relative;\n}\n"],"names":[],"sourceRoot":""}
|
react-qa/build/static/css/main.94510c01.css.map
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"version":3,"file":"static/css/main.94510c01.css","mappings":"AAAA,KAKE,kCAAmC,CACnC,iCAAkC,CAJlC,mIAEY,CAHZ,QAMF,CAEA,KACE,uEAEF,CCZA,mBACI,iBACF,CAGA,iBAGE,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAEN,UACF,CAEA,mBACE,iBACF,CAEA,sBAEE,qBAAsB,CADtB,mBAEF,CAEA,OACE,WACF,CAEA,MACE,WACF,CAEA,MACE,WACF,CAEA,MACE,WACF,CAEA,MACE,WAEF,CACA,8BAKE,WACF,CAEA,UAIE,eAAgB,CAHhB,oBAAqB,CAErB,WAAY,CAIZ,MAAO,CAFP,iBAAkB,CAClB,KAAM,CAJN,UAMF,CAEA,WACE,oBAAqB,CAErB,QAAS,CADT,cAEF","sources":["index.css","../node_modules/react-transformer-qa-decode-visualize/dist/index.css"],"sourcesContent":["body {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n",".position-relative {\n position: relative;\n }\n \n \n .align-to-parent {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n }\n \n .span-hl-container{\n color: rgba(0, 0, 0, 0);\n }\n \n .span-hl-container hl{\n pointer-events: auto;\n background-color: gray;\n }\n \n .op-10{\n opacity: 0.55;\n }\n \n .op-9{\n opacity: 0.25;\n }\n \n .op-8{\n opacity: 0.15;\n }\n \n .op-7{\n opacity: 0.05;\n }\n \n .op-6 {\n opacity: 0.03;\n \n }\n .op-5,\n .op-4,\n .op-3,\n .op-2,\n .op-1{\n opacity: 0.02;\n }\n \n .bg-block{\n display: inline-block;\n width: 100%;\n height: 100%;\n content: \"\\200D\";\n position: absolute;\n top: 0;\n left: 0;\n }\n \n ul.hl-list{\n list-style-type: none;\n padding-left: 0;\n margin: 0;\n }"],"names":[],"sourceRoot":""}
|
|
|
|
react-qa/build/static/js/{main.c81f1cea.js β main.c56dfbe5.js}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
react-qa/build/static/js/{main.c81f1cea.js.LICENSE.txt β main.c56dfbe5.js.LICENSE.txt}
RENAMED
File without changes
|
react-qa/build/static/js/{main.c81f1cea.js.map β main.c56dfbe5.js.map}
RENAMED
The diff for this file is too large to render.
See raw diff
|
|
react-qa/package-lock.json
CHANGED
@@ -15,7 +15,8 @@
|
|
15 |
"react": "^18.2.0",
|
16 |
"react-dom": "^18.2.0",
|
17 |
"react-scripts": "5.0.1",
|
18 |
-
"react-
|
|
|
19 |
"web-vitals": "^2.1.4"
|
20 |
}
|
21 |
},
|
@@ -14148,9 +14149,9 @@
|
|
14148 |
}
|
14149 |
},
|
14150 |
"node_modules/react-transformer-qa-decode-visualize": {
|
14151 |
-
"version": "0.1.
|
14152 |
-
"resolved": "https://registry.npmjs.org/react-transformer-qa-decode-visualize/-/react-transformer-qa-decode-visualize-0.1.
|
14153 |
-
"integrity": "sha512-
|
14154 |
"dependencies": {
|
14155 |
"@babel/polyfill": "^7.12.1",
|
14156 |
"@testing-library/jest-dom": "^5.16.2",
|
@@ -26971,9 +26972,9 @@
|
|
26971 |
}
|
26972 |
},
|
26973 |
"react-transformer-qa-decode-visualize": {
|
26974 |
-
"version": "0.1.
|
26975 |
-
"resolved": "https://registry.npmjs.org/react-transformer-qa-decode-visualize/-/react-transformer-qa-decode-visualize-0.1.
|
26976 |
-
"integrity": "sha512-
|
26977 |
"requires": {
|
26978 |
"@babel/polyfill": "^7.12.1",
|
26979 |
"@testing-library/jest-dom": "^5.16.2",
|
|
|
15 |
"react": "^18.2.0",
|
16 |
"react-dom": "^18.2.0",
|
17 |
"react-scripts": "5.0.1",
|
18 |
+
"react-tooltip": "^4.2.21",
|
19 |
+
"react-transformer-qa-decode-visualize": "^0.1.7",
|
20 |
"web-vitals": "^2.1.4"
|
21 |
}
|
22 |
},
|
|
|
14149 |
}
|
14150 |
},
|
14151 |
"node_modules/react-transformer-qa-decode-visualize": {
|
14152 |
+
"version": "0.1.7",
|
14153 |
+
"resolved": "https://registry.npmjs.org/react-transformer-qa-decode-visualize/-/react-transformer-qa-decode-visualize-0.1.7.tgz",
|
14154 |
+
"integrity": "sha512-0VWpDn4dVAcPIE2tpMXZwtz7/PjtgC8Xqh8XNg66tkO7p81ZVWiO7xA7HoIWhUHiN2iHw3APt11VeMLILcV80Q==",
|
14155 |
"dependencies": {
|
14156 |
"@babel/polyfill": "^7.12.1",
|
14157 |
"@testing-library/jest-dom": "^5.16.2",
|
|
|
26972 |
}
|
26973 |
},
|
26974 |
"react-transformer-qa-decode-visualize": {
|
26975 |
+
"version": "0.1.7",
|
26976 |
+
"resolved": "https://registry.npmjs.org/react-transformer-qa-decode-visualize/-/react-transformer-qa-decode-visualize-0.1.7.tgz",
|
26977 |
+
"integrity": "sha512-0VWpDn4dVAcPIE2tpMXZwtz7/PjtgC8Xqh8XNg66tkO7p81ZVWiO7xA7HoIWhUHiN2iHw3APt11VeMLILcV80Q==",
|
26978 |
"requires": {
|
26979 |
"@babel/polyfill": "^7.12.1",
|
26980 |
"@testing-library/jest-dom": "^5.16.2",
|
react-qa/package.json
CHANGED
@@ -11,7 +11,8 @@
|
|
11 |
"react": "^18.2.0",
|
12 |
"react-dom": "^18.2.0",
|
13 |
"react-scripts": "5.0.1",
|
14 |
-
"react-
|
|
|
15 |
"web-vitals": "^2.1.4"
|
16 |
},
|
17 |
"scripts": {
|
|
|
11 |
"react": "^18.2.0",
|
12 |
"react-dom": "^18.2.0",
|
13 |
"react-scripts": "5.0.1",
|
14 |
+
"react-tooltip": "^4.2.21",
|
15 |
+
"react-transformer-qa-decode-visualize": "^0.1.7",
|
16 |
"web-vitals": "^2.1.4"
|
17 |
},
|
18 |
"scripts": {
|
react-qa/src/App.js
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
import { HlList, HlLayerContainer, HlLayer } from 'react-transformer-qa-decode-visualize'
|
2 |
import 'react-transformer-qa-decode-visualize/dist/index.css'
|
3 |
-
import { useState } from 'react'
|
|
|
4 |
const axios = require('axios').default;
|
5 |
function App() {
|
6 |
|
7 |
const [qa_data, set_qa_data] = useState([[]])
|
8 |
-
const [question, set_question] = useState("
|
9 |
-
const [context, set_context] = useState("
|
10 |
|
11 |
let request_qa_data = (e,_question=question,_context=context) => {
|
12 |
const { REACT_APP_IN_DEV = 'false' } = process.env;
|
@@ -24,6 +25,11 @@ function App() {
|
|
24 |
})
|
25 |
}
|
26 |
|
|
|
|
|
|
|
|
|
|
|
27 |
return (
|
28 |
<div style={{ width: 800, padding: 20 }}>
|
29 |
|
@@ -83,7 +89,7 @@ function App() {
|
|
83 |
data={{
|
84 |
result: stride_qa_data
|
85 |
}}
|
86 |
-
color='
|
87 |
<hr />
|
88 |
</div>
|
89 |
|
@@ -95,14 +101,14 @@ function App() {
|
|
95 |
result: stride_qa_data,
|
96 |
context: context
|
97 |
}}
|
98 |
-
color='
|
99 |
/>
|
100 |
<HlLayer
|
101 |
data={{
|
102 |
result: stride_qa_data.slice(0, 1),
|
103 |
context: context
|
104 |
}}
|
105 |
-
color='
|
106 |
/>
|
107 |
</HlLayerContainer >
|
108 |
</div>
|
|
|
1 |
import { HlList, HlLayerContainer, HlLayer } from 'react-transformer-qa-decode-visualize'
|
2 |
import 'react-transformer-qa-decode-visualize/dist/index.css'
|
3 |
+
import { useState,useEffect } from 'react'
|
4 |
+
|
5 |
const axios = require('axios').default;
|
6 |
function App() {
|
7 |
|
8 |
const [qa_data, set_qa_data] = useState([[]])
|
9 |
+
const [question, set_question] = useState("Who wrote Harry Potter?")
|
10 |
+
const [context, set_context] = useState("Harry Potter is a series of seven fantasy novels written by British author J. K. Rowling. The novels chronicle the lives of a young wizard, Harry Potter, and his friends Hermione Granger and Ron Weasley, all of whom are students at Hogwarts School of Witchcraft and Wizardry. The main story arc concerns Harry's struggle against Lord Voldemort, a dark wizard who intends to become immortal, overthrow the wizard governing body known as the Ministry of Magic and subjugate all wizards and Muggles (non-magical people).")
|
11 |
|
12 |
let request_qa_data = (e,_question=question,_context=context) => {
|
13 |
const { REACT_APP_IN_DEV = 'false' } = process.env;
|
|
|
25 |
})
|
26 |
}
|
27 |
|
28 |
+
|
29 |
+
useEffect(()=>{
|
30 |
+
request_qa_data(undefined,question,context) // eslint-disable-next-line
|
31 |
+
},[])
|
32 |
+
|
33 |
return (
|
34 |
<div style={{ width: 800, padding: 20 }}>
|
35 |
|
|
|
89 |
data={{
|
90 |
result: stride_qa_data
|
91 |
}}
|
92 |
+
color='#fc7703' />
|
93 |
<hr />
|
94 |
</div>
|
95 |
|
|
|
101 |
result: stride_qa_data,
|
102 |
context: context
|
103 |
}}
|
104 |
+
color='#fc7703'
|
105 |
/>
|
106 |
<HlLayer
|
107 |
data={{
|
108 |
result: stride_qa_data.slice(0, 1),
|
109 |
context: context
|
110 |
}}
|
111 |
+
color='red'
|
112 |
/>
|
113 |
</HlLayerContainer >
|
114 |
</div>
|