p208p2002 commited on
Commit
fc24d64
·
1 Parent(s): ae9ab04
react-qa/build/asset-manifest.json CHANGED
@@ -1,15 +1,15 @@
1
  {
2
  "files": {
3
- "main.css": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/css/main.94510c01.css",
4
- "main.js": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/js/main.d0588918.js",
5
- "static/js/787.e7ee5088.chunk.js": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/js/787.e7ee5088.chunk.js",
6
- "index.html": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/index.html",
7
- "main.94510c01.css.map": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/css/main.94510c01.css.map",
8
- "main.d0588918.js.map": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/js/main.d0588918.js.map",
9
- "787.e7ee5088.chunk.js.map": "/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/js/787.e7ee5088.chunk.js.map"
10
  },
11
  "entrypoints": [
12
  "static/css/main.94510c01.css",
13
- "static/js/main.d0588918.js"
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="/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/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="/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/logo192.png"/><link rel="manifest" href="/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/manifest.json"/><title>React App</title><script defer="defer" src="/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/static/js/main.d0588918.js"></script><link href="/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build/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>
 
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.co/spaces/p208p2002/Transformer-QA-Decode-Visualize/raw/main/react-qa/build",
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 read_root():
34
- # html_content = open('react-qa/build/index.html','r').read()
35
- # return HTMLResponse(content=html_content,status_code=200)
36
 
37
  @app.get("/")
38
- async def main(request: Request):
39
- print(request.url._url)
40
- return {"raw_url": request.url._url}
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):