From 09f23c71524fd2c134b1b34e43964b5ef1434717 Mon Sep 17 00:00:00 2001 From: ZhangGe6 Date: Fri, 22 Apr 2022 21:09:42 +0800 Subject: [PATCH] onnx.js during host.require(id) is missed now --- __pycache__/app.cpython-38.pyc | Bin 0 -> 366 bytes app.py | 9 +++++ __init__.py => static/__init__.py | 0 __version__.py => static/__version__.py | 0 app.js => static/app.js | 0 base.js => static/base.js | 0 dagre.js => static/dagre.js | 0 electron.js => static/electron.js | 0 favicon.ico => static/favicon.ico | Bin flatbuffers.js => static/flatbuffers.js | 0 gzip.js => static/gzip.js | 0 hdf5.js => static/hdf5.js | 0 icon.png => static/icon.png | Bin index.js => static/index.js | 3 +- json.js => static/json.js | 0 numpy.js => static/numpy.js | 0 .../onnx-metadata.json | 0 onnx-proto.js => static/onnx-proto.js | 0 onnx-schema.js => static/onnx-schema.js | 0 onnx.js => static/onnx.js | 0 pickle.js => static/pickle.js | 0 protobuf.js => static/protobuf.js | 0 python.js => static/python.js | 0 server.py => static/server.py | 0 tar.js => static/tar.js | 0 text.js => static/text.js | 0 view-grapher.css => static/view-grapher.css | 0 view-grapher.js => static/view-grapher.js | 0 view-sidebar.css => static/view-sidebar.css | 0 view-sidebar.js => static/view-sidebar.js | 0 view.js => static/view.js | 0 weka.js => static/weka.js | 0 xml.js => static/xml.js | 0 zip.js => static/zip.js | 0 electron.html => templates/electron.html | 4 +- index.html => templates/index.html | 35 +++++++++--------- 36 files changed, 31 insertions(+), 20 deletions(-) create mode 100644 __pycache__/app.cpython-38.pyc create mode 100644 app.py rename __init__.py => static/__init__.py (100%) rename __version__.py => static/__version__.py (100%) rename app.js => static/app.js (100%) rename base.js => static/base.js (100%) rename dagre.js => static/dagre.js (100%) rename electron.js => static/electron.js (100%) rename favicon.ico => static/favicon.ico (100%) rename flatbuffers.js => static/flatbuffers.js (100%) rename gzip.js => static/gzip.js (100%) rename hdf5.js => static/hdf5.js (100%) rename icon.png => static/icon.png (100%) rename index.js => static/index.js (99%) rename json.js => static/json.js (100%) rename numpy.js => static/numpy.js (100%) rename onnx-metadata.json => static/onnx-metadata.json (100%) rename onnx-proto.js => static/onnx-proto.js (100%) rename onnx-schema.js => static/onnx-schema.js (100%) rename onnx.js => static/onnx.js (100%) rename pickle.js => static/pickle.js (100%) rename protobuf.js => static/protobuf.js (100%) rename python.js => static/python.js (100%) rename server.py => static/server.py (100%) rename tar.js => static/tar.js (100%) rename text.js => static/text.js (100%) rename view-grapher.css => static/view-grapher.css (100%) rename view-grapher.js => static/view-grapher.js (100%) rename view-sidebar.css => static/view-sidebar.css (100%) rename view-sidebar.js => static/view-sidebar.js (100%) rename view.js => static/view.js (100%) rename weka.js => static/weka.js (100%) rename xml.js => static/xml.js (100%) rename zip.js => static/zip.js (100%) rename electron.html => templates/electron.html (99%) rename index.html => templates/index.html (96%) diff --git a/__pycache__/app.cpython-38.pyc b/__pycache__/app.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..330c705d9f5ec85d2aa64c6fc57fb4beaf0d4977 GIT binary patch literal 366 zcmYjLu};G<5cN568da*`H?jn=B7~5NVC#aqM3JJjK1fwNiEKv#*75;-LK*oW7OzbF zLZ_a?K%aE){7(1$ZaJGx8R2`sT76Le3E~tHiCZe06G5;@A-0sX`m zZ_^EVU-HIjm4OLoeK8}bjdZx2UzJOX#+F4>x6cn)-l5&Pt}k13rfVy^(WUJMv&ORS z`@DbkqCus)ID~~%#?6FykxdHm6z(-)IwtwFs@hs(Rr!d_UYKrhIIjPn@b^l{mfpH2?qr literal 0 HcmV?d00001 diff --git a/app.py b/app.py new file mode 100644 index 0000000..ee5ac96 --- /dev/null +++ b/app.py @@ -0,0 +1,9 @@ +from flask import Flask, render_template +app = Flask(__name__) + +@app.route('/') +def hello(): + return render_template('index.html') + +if __name__ == '__main__': + app.run() \ No newline at end of file diff --git a/__init__.py b/static/__init__.py similarity index 100% rename from __init__.py rename to static/__init__.py diff --git a/__version__.py b/static/__version__.py similarity index 100% rename from __version__.py rename to static/__version__.py diff --git a/app.js b/static/app.js similarity index 100% rename from app.js rename to static/app.js diff --git a/base.js b/static/base.js similarity index 100% rename from base.js rename to static/base.js diff --git a/dagre.js b/static/dagre.js similarity index 100% rename from dagre.js rename to static/dagre.js diff --git a/electron.js b/static/electron.js similarity index 100% rename from electron.js rename to static/electron.js diff --git a/favicon.ico b/static/favicon.ico similarity index 100% rename from favicon.ico rename to static/favicon.ico diff --git a/flatbuffers.js b/static/flatbuffers.js similarity index 100% rename from flatbuffers.js rename to static/flatbuffers.js diff --git a/gzip.js b/static/gzip.js similarity index 100% rename from gzip.js rename to static/gzip.js diff --git a/hdf5.js b/static/hdf5.js similarity index 100% rename from hdf5.js rename to static/hdf5.js diff --git a/icon.png b/static/icon.png similarity index 100% rename from icon.png rename to static/icon.png diff --git a/index.js b/static/index.js similarity index 99% rename from index.js rename to static/index.js index 68a4e90..77a9206 100644 --- a/index.js +++ b/static/index.js @@ -298,7 +298,8 @@ host.BrowserHost = class { const script = document.createElement('script'); script.setAttribute('id', id); script.setAttribute('type', 'text/javascript'); - script.setAttribute('src', url); + // script.setAttribute('src', url); + script.setAttribute('src', "{{url_for('static', filename='onnx.js')}}"); script.onload = (e) => { if (this.window.module && this.window.module.exports) { const exports = this.window.module.exports; diff --git a/json.js b/static/json.js similarity index 100% rename from json.js rename to static/json.js diff --git a/numpy.js b/static/numpy.js similarity index 100% rename from numpy.js rename to static/numpy.js diff --git a/onnx-metadata.json b/static/onnx-metadata.json similarity index 100% rename from onnx-metadata.json rename to static/onnx-metadata.json diff --git a/onnx-proto.js b/static/onnx-proto.js similarity index 100% rename from onnx-proto.js rename to static/onnx-proto.js diff --git a/onnx-schema.js b/static/onnx-schema.js similarity index 100% rename from onnx-schema.js rename to static/onnx-schema.js diff --git a/onnx.js b/static/onnx.js similarity index 100% rename from onnx.js rename to static/onnx.js diff --git a/pickle.js b/static/pickle.js similarity index 100% rename from pickle.js rename to static/pickle.js diff --git a/protobuf.js b/static/protobuf.js similarity index 100% rename from protobuf.js rename to static/protobuf.js diff --git a/python.js b/static/python.js similarity index 100% rename from python.js rename to static/python.js diff --git a/server.py b/static/server.py similarity index 100% rename from server.py rename to static/server.py diff --git a/tar.js b/static/tar.js similarity index 100% rename from tar.js rename to static/tar.js diff --git a/text.js b/static/text.js similarity index 100% rename from text.js rename to static/text.js diff --git a/view-grapher.css b/static/view-grapher.css similarity index 100% rename from view-grapher.css rename to static/view-grapher.css diff --git a/view-grapher.js b/static/view-grapher.js similarity index 100% rename from view-grapher.js rename to static/view-grapher.js diff --git a/view-sidebar.css b/static/view-sidebar.css similarity index 100% rename from view-sidebar.css rename to static/view-sidebar.css diff --git a/view-sidebar.js b/static/view-sidebar.js similarity index 100% rename from view-sidebar.js rename to static/view-sidebar.js diff --git a/view.js b/static/view.js similarity index 100% rename from view.js rename to static/view.js diff --git a/weka.js b/static/weka.js similarity index 100% rename from weka.js rename to static/weka.js diff --git a/xml.js b/static/xml.js similarity index 100% rename from xml.js rename to static/xml.js diff --git a/zip.js b/static/zip.js similarity index 100% rename from zip.js rename to static/zip.js diff --git a/electron.html b/templates/electron.html similarity index 99% rename from electron.html rename to templates/electron.html index ecc5765..33ba5db 100644 --- a/electron.html +++ b/templates/electron.html @@ -5,8 +5,8 @@ Netron - - + +