This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
99 lines (98 loc) · 4.08 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link type="text/css" rel="stylesheet" href="css/port.css" media="screen"/>
<link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
<title>Port</title>
</head>
<body>
<div class="navbar">
<nav class="white z-depth-0">
<div class="nav-wrapper">
<a class="logo black-text">port:</a>
</div>
</nav>
</div>
<div id="port-container"></div>
<div id="txt-container" class="container" style="margin-top: 20px; display: none;">
<div class="row">
<div class="col s12">
<h4>Visual interface for functions, machine learning models and APIs</h4>
<p>
<b>Port</b> is an experimental JavaScript library that simplifies porting algorithms to web browsers.
It's based on the idea of declarative interface design and reactivity.
Instead of writing "glue" front-end code, you can just declare inputs/outputs of a model in a JSON schema and Port will do the rest.
Port creates input and output elements, parses files, loads needed libraries and uses web workers to run everything smoothly.
It's not a swiss-army knife, not a framework. Port solves one specific task - wrapping algorithms in a web interface.
</p>
</div>
</div>
<div class="row" style="margin-top: 50px; margin-bottom: 50px;">
<div class="col s3">
<div class="card source bordered">
<div class="card-content">
<h5>Javascript</h5>
<p>Port regular JavaScript functions and classes or use async methods</p>
</div>
</div>
</div>
<div class="col s3">
<div class="card source bordered">
<div class="card-content">
<h5>TensorFlow</h5>
<p>Import trained neural net models and run them with TensorFlow.js</p>
</div>
</div>
</div>
<div class="col s3">
<div class="card source bordered">
<div class="card-content">
<h5>Python</h5>
<p>Run Python with its scientific stack in the browser with Pyodide.js</p>
</div>
</div>
</div>
<div class="col s3">
<div class="card source bordered">
<div class="card-content">
<h5>API</h5>
<p>Test how your REST API works with a simple graphical UI</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col s12">
<ul class="collection">
<a href="?s=factorial" class="collection-item"><span class="badge">Javascript</span>Factorial</a>
<a href="?s=qrcode" class="collection-item"><span class="badge">Javascript</span>QR Code generator</a>
<a href="?s=sentiment" class="collection-item"><span class="badge">Javascript</span>Sentiment analysis</a>
<a href="?s=pysummary" class="collection-item"><span class="badge">Python</span>Pandas summary</a>
</ul>
</div>
</div>
</div>
<script src="dist/materialize.min.js" type="text/javascript"></script>
<script src="dist/port.js" type="text/javascript"></script>
<script>
var params = new URLSearchParams(window.location.search)
var schema = params.get('s')
if (schema) {
if (typeof schema === 'string') {
schema = schema.includes('/') ? schema : '/port-models/' + schema + '/schema.json'
}
var port = new Port({
portContainer: document.getElementById('port-container'),
schema: schema
})
} else {
document.getElementById('port-container').style.display = 'none'
document.getElementById('txt-container').style.display = 'block'
}
</script>
</body>
</html>