Topallaj Denis commited on
Commit
34b109a
1 Parent(s): 0fa1652

test again

Browse files
Files changed (2) hide show
  1. main.py +1 -1
  2. static/script.js +13 -7
main.py CHANGED
@@ -39,7 +39,7 @@ def home() -> FileResponse:
39
  return FileResponse(path="/app/static/index.html", media_type="text/html")
40
 
41
  @app.post("/predict")
42
- def predict_UniKP_values(sequence: str = Form(...), smiles: str = Form(...)) -> Dict[str, float]:
43
 
44
  endpointHandler = EndpointHandler()
45
  result = endpointHandler.predict({
 
39
  return FileResponse(path="/app/static/index.html", media_type="text/html")
40
 
41
  @app.post("/predict")
42
+ def predict_UniKP_values(sequence: str, smiles: str) -> Dict[str, float]:
43
 
44
  endpointHandler = EndpointHandler()
45
  result = endpointHandler.predict({
static/script.js CHANGED
@@ -15,15 +15,21 @@ document.querySelector("#predict-form").addEventListener("submit", async (e) =>
15
  });
16
 
17
  const prediction = async (sequence, smiles) => {
18
- // send POST request with FormData
19
- const formData = new FormData();
20
- formData.append("sequence", sequence);
21
- formData.append("smiles", smiles);
22
-
23
- const response = await fetch("/predict", {
24
  method: "POST",
25
- body: formData,
 
 
 
26
  });
27
  const data = await response.json();
28
  return data;
 
 
 
 
 
 
 
29
  };
 
15
  });
16
 
17
  const prediction = async (sequence, smiles) => {
18
+
19
+ /*const response = await fetch("/predict", {
 
 
 
 
20
  method: "POST",
21
+ body: {
22
+ sequence: sequence,
23
+ smiles: smiles,
24
+ }
25
  });
26
  const data = await response.json();
27
  return data;
28
+ */
29
+
30
+ return {
31
+ km: 1,
32
+ kcat: 2,
33
+ vmax: 3,
34
+ }
35
  };