From 8766d2699ab1ef3594cd743d1396f2d4442ac1c7 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sat, 18 May 2024 14:28:16 -0700 Subject: [PATCH] refac: include packages --- src/lib/components/chat/Messages/CodeBlock.svelte | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/Messages/CodeBlock.svelte b/src/lib/components/chat/Messages/CodeBlock.svelte index 695682f01..f71f5062e 100644 --- a/src/lib/components/chat/Messages/CodeBlock.svelte +++ b/src/lib/components/chat/Messages/CodeBlock.svelte @@ -183,7 +183,10 @@ code.includes('bs4') ? 'beautifulsoup4' : null, code.includes('numpy') ? 'numpy' : null, code.includes('pandas') ? 'pandas' : null, - code.includes('matplotlib') ? 'matplotlib' : null + code.includes('matplotlib') ? 'matplotlib' : null, + code.includes('scikit-learn') ? 'sklearn' : null, + code.includes('scipy') ? 'scipy' : null, + code.includes('re') ? 'regex' : null ].filter(Boolean); console.log(packages); @@ -230,7 +233,9 @@ __builtins__.input = input`); code.includes('bs4') ? 'beautifulsoup4' : null, code.includes('numpy') ? 'numpy' : null, code.includes('pandas') ? 'pandas' : null, - code.includes('matplotlib') ? 'matplotlib' : null + code.includes('scikit-learn') ? 'sklearn' : null, + code.includes('scipy') ? 'scipy' : null, + code.includes('re') ? 'regex' : null ].filter(Boolean); const pyodideWorker = new PyodideWorker();