Spaces:
Runtime error
Runtime error
Update
Browse files- react-qa/build/asset-manifest.json +8 -8
- react-qa/build/index.html +1 -1
- react-qa/package.json +1 -1
- server.py +9 -6
react-qa/build/asset-manifest.json
CHANGED
@@ -1,15 +1,15 @@
|
|
1 |
{
|
2 |
"files": {
|
3 |
-
"main.css": "/
|
4 |
-
"main.js": "/
|
5 |
-
"static/js/787.e7ee5088.chunk.js": "/
|
6 |
-
"index.html": "/
|
7 |
-
"main.94510c01.css.map": "/
|
8 |
-
"main.
|
9 |
-
"787.e7ee5088.chunk.js.map": "/
|
10 |
},
|
11 |
"entrypoints": [
|
12 |
"static/css/main.94510c01.css",
|
13 |
-
"static/js/main.
|
14 |
]
|
15 |
}
|
|
|
1 |
{
|
2 |
"files": {
|
3 |
+
"main.css": "/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.94510c01.css",
|
4 |
+
"main.js": "/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.b6504505.js",
|
5 |
+
"static/js/787.e7ee5088.chunk.js": "/p208p2002/Transformer-QA-Decode-Visualize/static/js/787.e7ee5088.chunk.js",
|
6 |
+
"index.html": "/p208p2002/Transformer-QA-Decode-Visualize/index.html",
|
7 |
+
"main.94510c01.css.map": "/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.94510c01.css.map",
|
8 |
+
"main.b6504505.js.map": "/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.b6504505.js.map",
|
9 |
+
"787.e7ee5088.chunk.js.map": "/p208p2002/Transformer-QA-Decode-Visualize/static/js/787.e7ee5088.chunk.js.map"
|
10 |
},
|
11 |
"entrypoints": [
|
12 |
"static/css/main.94510c01.css",
|
13 |
+
"static/js/main.b6504505.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="/
|
|
|
1 |
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/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="/p208p2002/Transformer-QA-Decode-Visualize/logo192.png"/><link rel="manifest" href="/p208p2002/Transformer-QA-Decode-Visualize/manifest.json"/><title>React App</title><script defer="defer" src="/p208p2002/Transformer-QA-Decode-Visualize/static/js/main.b6504505.js"></script><link href="/p208p2002/Transformer-QA-Decode-Visualize/static/css/main.94510c01.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
react-qa/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
{
|
2 |
"name": "react-qa",
|
3 |
-
"homepage": "https://huggingface.
|
4 |
"version": "0.1.0",
|
5 |
"private": true,
|
6 |
"dependencies": {
|
|
|
1 |
{
|
2 |
"name": "react-qa",
|
3 |
+
"homepage": "https://spaces.huggingface.tech/p208p2002/Transformer-QA-Decode-Visualize",
|
4 |
"version": "0.1.0",
|
5 |
"private": true,
|
6 |
"dependencies": {
|
server.py
CHANGED
@@ -28,16 +28,19 @@ class QAItem(BaseModel):
|
|
28 |
question:str
|
29 |
context:str
|
30 |
|
|
|
|
|
|
|
31 |
|
32 |
# @app.get("/")
|
33 |
-
# def
|
34 |
-
#
|
35 |
-
# return
|
36 |
|
37 |
@app.get("/")
|
38 |
-
|
39 |
-
|
40 |
-
return
|
41 |
|
42 |
@app.post("/question-answer")
|
43 |
def read_item(item:QAItem):
|
|
|
28 |
question:str
|
29 |
context:str
|
30 |
|
31 |
+
# https://hf.space/embed/{user}/{space}
|
32 |
+
# {"raw_url":"http://spaces.huggingface.tech/?__theme=light"}
|
33 |
+
# https://spaces.huggingface.tech/p208p2002/Transformer-QA-Decode-Visualize/
|
34 |
|
35 |
# @app.get("/")
|
36 |
+
# async def main(request: Request):
|
37 |
+
# print(request.url._url)
|
38 |
+
# return {"raw_url": request.url._url}
|
39 |
|
40 |
@app.get("/")
|
41 |
+
def read_root():
|
42 |
+
html_content = open('react-qa/build/index.html','r').read()
|
43 |
+
return HTMLResponse(content=html_content,status_code=200)
|
44 |
|
45 |
@app.post("/question-answer")
|
46 |
def read_item(item:QAItem):
|