bjornsing commited on
Commit
b4e7171
1 Parent(s): d1fc51c

add local dev NB

Browse files
Files changed (1) hide show
  1. test.ipynb +85 -0
test.ipynb ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 2,
6
+ "metadata": {},
7
+ "outputs": [
8
+ {
9
+ "name": "stdout",
10
+ "output_type": "stream",
11
+ "text": [
12
+ "Running on local URL: http://127.0.0.1:7860\n",
13
+ "\n",
14
+ "To create a public link, set `share=True` in `launch()`.\n"
15
+ ]
16
+ },
17
+ {
18
+ "data": {
19
+ "text/html": [
20
+ "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
21
+ ],
22
+ "text/plain": [
23
+ "<IPython.core.display.HTML object>"
24
+ ]
25
+ },
26
+ "metadata": {},
27
+ "output_type": "display_data"
28
+ }
29
+ ],
30
+ "source": [
31
+ "import gradio as gr\n",
32
+ "\n",
33
+ "title = \"VO2max calculator\"\n",
34
+ "\n",
35
+ "def greet(vekt, høyde, midje, alder, kjønn):\n",
36
+ "\n",
37
+ " vo2 = vekt*høyde*midje*alder*kjønn\n",
38
+ " return vo2\n",
39
+ "\n",
40
+ "demo = gr.Interface(\n",
41
+ " fn=greet,\n",
42
+ " title=title,\n",
43
+ " inputs=[\"number\", \"number\", \"number\", \"number\", gr.Radio([\"Mann\", \"Kvinne\"], type=\"index\")],\n",
44
+ " outputs=[\"number\"],\n",
45
+ ")\n",
46
+ "if __name__ == \"__main__\":\n",
47
+ " demo.launch()"
48
+ ]
49
+ },
50
+ {
51
+ "cell_type": "code",
52
+ "execution_count": null,
53
+ "metadata": {},
54
+ "outputs": [],
55
+ "source": []
56
+ }
57
+ ],
58
+ "metadata": {
59
+ "kernelspec": {
60
+ "display_name": "base",
61
+ "language": "python",
62
+ "name": "python3"
63
+ },
64
+ "language_info": {
65
+ "codemirror_mode": {
66
+ "name": "ipython",
67
+ "version": 3
68
+ },
69
+ "file_extension": ".py",
70
+ "mimetype": "text/x-python",
71
+ "name": "python",
72
+ "nbconvert_exporter": "python",
73
+ "pygments_lexer": "ipython3",
74
+ "version": "3.8.5"
75
+ },
76
+ "orig_nbformat": 4,
77
+ "vscode": {
78
+ "interpreter": {
79
+ "hash": "39192be711985d5a4908b881b6a992a73610e2430c975ad8c4f9221a910d9ff0"
80
+ }
81
+ }
82
+ },
83
+ "nbformat": 4,
84
+ "nbformat_minor": 2
85
+ }