Jackss commited on
Commit
ccadd77
·
1 Parent(s): 4c48113
Files changed (2) hide show
  1. main.py +1 -1
  2. static/index.html +2 -0
main.py CHANGED
@@ -23,7 +23,7 @@ app.mount("/", StaticFiles(directory="static", html=True), name="static")
23
  def index() -> FileResponse:
24
  return FileResponse(path="/app/static/index.html", media_type="text/html")
25
 
26
- @app.get('/similarity')
27
  def similarity(input):
28
  papers = input['papers']
29
  title_abs = [d['title'] + tokenizer.sep_token + (d.get('abstract') or '') for d in papers]
 
23
  def index() -> FileResponse:
24
  return FileResponse(path="/app/static/index.html", media_type="text/html")
25
 
26
+ @app.post('/similarity')
27
  def similarity(input):
28
  papers = input['papers']
29
  title_abs = [d['title'] + tokenizer.sep_token + (d.get('abstract') or '') for d in papers]
static/index.html CHANGED
@@ -28,7 +28,9 @@
28
  });
29
 
30
  const content = await response.json();
 
31
  document.querySelector("#res").innerHTML = content.toString()
 
32
  }
33
 
34
 
 
28
  });
29
 
30
  const content = await response.json();
31
+ console.log(content)
32
  document.querySelector("#res").innerHTML = content.toString()
33
+ return content['output']
34
  }
35
 
36