leandro
commited on
Commit
·
dc98e6a
1
Parent(s):
ecdfb50
index
Browse files- static/index.html +14 -9
static/index.html
CHANGED
|
@@ -30,6 +30,10 @@
|
|
| 30 |
font-family: 'Courier New', Courier, monospace;
|
| 31 |
}
|
| 32 |
</style>
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
</head>
|
| 34 |
<body>
|
| 35 |
<h1>Jupyter Kernel Execution API</h1>
|
|
@@ -48,19 +52,20 @@
|
|
| 48 |
|
| 49 |
<h2>Endpoints</h2>
|
| 50 |
<h3>Execution Endpoint</h3>
|
| 51 |
-
<pre><code>import requests
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
print(requests.post(url, json={'code': 'print(y*x)'}).json())</code></pre>
|
| 57 |
|
| 58 |
<h3>Kernel Restart Endpoint</h3>
|
| 59 |
-
<pre><code>url = "https://lvwerra-executor.hf.space/restart"
|
| 60 |
-
|
| 61 |
|
| 62 |
<h3>Health Check Endpoint</h3>
|
| 63 |
-
<pre><code>url = "https://lvwerra-executor.hf.space/health"
|
| 64 |
-
|
| 65 |
</body>
|
| 66 |
</html>
|
|
|
|
| 30 |
font-family: 'Courier New', Courier, monospace;
|
| 31 |
}
|
| 32 |
</style>
|
| 33 |
+
<link href="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/prism.min.css" rel="stylesheet" />
|
| 34 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/prism.min.js"></script>
|
| 35 |
+
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/components/prism-python.min.js"></script>
|
| 36 |
+
|
| 37 |
</head>
|
| 38 |
<body>
|
| 39 |
<h1>Jupyter Kernel Execution API</h1>
|
|
|
|
| 52 |
|
| 53 |
<h2>Endpoints</h2>
|
| 54 |
<h3>Execution Endpoint</h3>
|
| 55 |
+
<pre><code class="language-python">import requests
|
| 56 |
+
|
| 57 |
+
url = "https://lvwerra-executor.hf.space/execute"
|
| 58 |
|
| 59 |
+
print(requests.post(url, json={'code': 'x=10'}).json())
|
| 60 |
+
print(requests.post(url, json={'code': 'y=20'}).json())
|
| 61 |
+
print(requests.post(url, json={'code': 'print(y*x)'}).json())</code></pre>
|
|
|
|
| 62 |
|
| 63 |
<h3>Kernel Restart Endpoint</h3>
|
| 64 |
+
<pre><code class="language-python">url = "https://lvwerra-executor.hf.space/restart"
|
| 65 |
+
print(requests.post(url).json())</code></pre>
|
| 66 |
|
| 67 |
<h3>Health Check Endpoint</h3>
|
| 68 |
+
<pre><code class="language-python">url = "https://lvwerra-executor.hf.space/health"
|
| 69 |
+
print(requests.get(url).json())</code></pre>
|
| 70 |
</body>
|
| 71 |
</html>
|