pinokiod 1.2.42 → 1.2.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const path = require('path')
|
|
2
|
+
const { client } = require('node-gradio-client')
|
|
2
3
|
class Gradio {
|
|
3
4
|
/*
|
|
4
5
|
{
|
|
@@ -16,17 +17,17 @@ class Gradio {
|
|
|
16
17
|
*/
|
|
17
18
|
async predict(req, ondata, kernel) {
|
|
18
19
|
if (!this.client) {
|
|
19
|
-
const gradio_path = path.resolve(__dirname, '../../../node_modules/node-gradio-client/dist')
|
|
20
|
+
//const gradio_path = path.resolve(__dirname, '../../../node_modules/node-gradio-client/dist')
|
|
20
21
|
//const gradio_path = path.resolve(__dirname, '../../../node_modules/node-gradio-client/dist/index.mjs')
|
|
21
22
|
//const gradio_path = path.resolve(__dirname, '../../../node_modules/node-gradio-client')
|
|
22
23
|
//const gradio_path = "node-gradio-client"
|
|
23
24
|
//const gradio_path = path.resolve(__dirname, 'node-gradio-client')
|
|
24
25
|
//const gradio_path = path.resolve(__dirname, 'node-gradio-client')
|
|
25
26
|
//const gradio_path = path.resolve(__dirname, '../../../node_modules/node-gradio-client/dist/index.js')
|
|
26
|
-
console.log("gradio_path", gradio_path)
|
|
27
|
+
//console.log("gradio_path", gradio_path)
|
|
27
28
|
//const gradio_path = 'node-gradio-client'
|
|
28
|
-
const dynamic = new Function('modulePath', 'return import(modulePath)');
|
|
29
|
-
const { client } = await dynamic(gradio_path)
|
|
29
|
+
//const dynamic = new Function('modulePath', 'return import(modulePath)');
|
|
30
|
+
//const { client } = await dynamic(gradio_path)
|
|
30
31
|
// const { client } = await import(gradio_path)
|
|
31
32
|
//const { client } = require(gradio_path)
|
|
32
33
|
console.log("Client", client)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.43",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"multer": "^1.4.5-lts.1",
|
|
44
44
|
"node-calls-python": "^1.8.2",
|
|
45
45
|
"node-downloader-helper": "^2.1.9",
|
|
46
|
-
"node-gradio-client": "^0.14.
|
|
46
|
+
"node-gradio-client": "^0.14.6",
|
|
47
47
|
"node-pty-prebuilt-multiarch-cp": "^0.10.1-pre.48",
|
|
48
48
|
"open": "8.4.2",
|
|
49
49
|
"pdrive": "^0.0.23",
|