mirror of
https://github.com/open-webui/open-webui
synced 2024-11-25 05:18:15 +00:00
fix: input prompt message
This commit is contained in:
parent
c7e1d3dbc7
commit
c7221983a5
@ -170,7 +170,7 @@
|
|||||||
const res = await pyodide.loadPackage('micropip');
|
const res = await pyodide.loadPackage('micropip');
|
||||||
console.log(res);
|
console.log(res);
|
||||||
|
|
||||||
pyodide.setStdin({ stdin: () => prompt() });
|
// pyodide.setStdin({ stdin: () => prompt() });
|
||||||
|
|
||||||
const micropip = pyodide.pyimport('micropip');
|
const micropip = pyodide.pyimport('micropip');
|
||||||
|
|
||||||
@ -186,6 +186,11 @@
|
|||||||
console.log(packages);
|
console.log(packages);
|
||||||
await micropip.install(packages);
|
await micropip.install(packages);
|
||||||
|
|
||||||
|
result = pyodide.runPython(`from js import prompt
|
||||||
|
def input(p):
|
||||||
|
return prompt(p)
|
||||||
|
__builtins__.input = input`);
|
||||||
|
|
||||||
result = pyodide.runPython(code);
|
result = pyodide.runPython(code);
|
||||||
|
|
||||||
if (!result) {
|
if (!result) {
|
||||||
|
Loading…
Reference in New Issue
Block a user