Skip to content

Commit

Permalink
security fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
syedzayyan committed May 21, 2024
1 parent 9daceb5 commit bc0b6aa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/tools/ml/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ import fpSorter from "../../../components/utils/fp_sorter";
import RDKitContext from "../../../context/RDKitContext";
import PyodideContext from "../../../context/PyodideContext";
import TargetContext from "../../../context/TargetContext";
import { MLResultsContext } from "../../../context/MLResultsContext";

type dataChart = {
x: number,
y: number
}

export const MLResultsContext = createContext<React.Dispatch<React.SetStateAction<any[]>>>(null);

export default function MLLayout({ children }) {
const [screenData, setScreenData] = useState([]);
const [foldNumSel, setFoldNumSel] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion app/tools/ml/rf/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useContext, useState } from "react";
import PyodideContext from "../../../../context/PyodideContext";
import { MLResultsContext } from "../layout";
import { MLResultsContext } from "../../../../context/MLResultsContext";
import RF from "../../../../components/ml-forms/RF";
import MLUtils from "../utils";
import Loader from "../../../../components/ui-comps/Loader";
Expand Down
2 changes: 1 addition & 1 deletion app/tools/ml/xgboost/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import { useContext, useState } from "react";
import PyodideContext from "../../../../context/PyodideContext";
import { MLResultsContext } from "../layout";
import MLUtils from "../utils";
import Loader from "../../../../components/ui-comps/Loader";
import XGB from "../../../../components/ml-forms/XGB";
import { MLResultsContext } from "../../../../context/MLResultsContext";

export default function RandomForest() {
const { pyodide } = useContext(PyodideContext);
Expand Down
4 changes: 4 additions & 0 deletions context/MLResultsContext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { createContext } from "react";


export const MLResultsContext = createContext<React.Dispatch<React.SetStateAction<any[]>>>(null);

0 comments on commit bc0b6aa

Please sign in to comment.