lordsquirrel
commited on
Commit
•
c5fed56
1
Parent(s):
a25ab35
Final stuff
Browse files- demo.py +4 -3
- model-test.ipynb +7 -13
demo.py
CHANGED
@@ -22,8 +22,8 @@ def classify_image(img):
|
|
22 |
return dict(zip(categories, map(float, probs)))
|
23 |
|
24 |
title = """
|
25 |
-
|
26 |
-
Tvivl ej 68 års invotation inden for machine learning skal nok fortælle dig om øllen er god eller ej
|
27 |
"""
|
28 |
image = gr.Image(shape=(192, 192))
|
29 |
label = gr.Label()
|
@@ -34,7 +34,8 @@ iface = gr.Interface(
|
|
34 |
inputs=image,
|
35 |
outputs=label,
|
36 |
examples=examples,
|
37 |
-
description=title,
|
|
|
38 |
)
|
39 |
|
40 |
iface.launch(inline=False)
|
|
|
22 |
return dict(zip(categories, map(float, probs)))
|
23 |
|
24 |
title = """
|
25 |
+
# Er du i tvivl om at den øl du sidder med i hånden lige, nu er god?
|
26 |
+
### Tvivl ej 68 års invotation inden for machine learning skal nok fortælle dig om øllen er god eller ej
|
27 |
"""
|
28 |
image = gr.Image(shape=(192, 192))
|
29 |
label = gr.Label()
|
|
|
34 |
inputs=image,
|
35 |
outputs=label,
|
36 |
examples=examples,
|
37 |
+
description=title,
|
38 |
+
title="Er du i tvivl om at den øl du sidder med i hånden lige nu er god? "
|
39 |
)
|
40 |
|
41 |
iface.launch(inline=False)
|
model-test.ipynb
CHANGED
@@ -75,14 +75,14 @@
|
|
75 |
},
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
-
"execution_count":
|
79 |
"metadata": {},
|
80 |
"outputs": [
|
81 |
{
|
82 |
"name": "stdout",
|
83 |
"output_type": "stream",
|
84 |
"text": [
|
85 |
-
"Running on local URL: http://127.0.0.1:
|
86 |
"\n",
|
87 |
"To create a public link, set `share=True` in `launch()`.\n"
|
88 |
]
|
@@ -91,16 +91,9 @@
|
|
91 |
"data": {
|
92 |
"text/plain": []
|
93 |
},
|
94 |
-
"execution_count":
|
95 |
"metadata": {},
|
96 |
"output_type": "execute_result"
|
97 |
-
},
|
98 |
-
{
|
99 |
-
"name": "stdout",
|
100 |
-
"output_type": "stream",
|
101 |
-
"text": [
|
102 |
-
" \r"
|
103 |
-
]
|
104 |
}
|
105 |
],
|
106 |
"source": [
|
@@ -114,8 +107,8 @@
|
|
114 |
" return dict(zip(categories, map(float, probs)))\n",
|
115 |
"\n",
|
116 |
"title = \"\"\"\n",
|
117 |
-
"
|
118 |
-
" Tvivl ej 68 års invotation inden for machine learning skal nok fortælle dig om øllen er god eller ej\n",
|
119 |
"\"\"\"\n",
|
120 |
"image = gr.Image(shape=(192, 192))\n",
|
121 |
"label = gr.Label()\n",
|
@@ -126,7 +119,8 @@
|
|
126 |
" inputs=image, \n",
|
127 |
" outputs=label, \n",
|
128 |
" examples=examples, \n",
|
129 |
-
" description=title
|
|
|
130 |
")\n",
|
131 |
"\n",
|
132 |
"iface.launch(inline=False)\n"
|
|
|
75 |
},
|
76 |
{
|
77 |
"cell_type": "code",
|
78 |
+
"execution_count": 45,
|
79 |
"metadata": {},
|
80 |
"outputs": [
|
81 |
{
|
82 |
"name": "stdout",
|
83 |
"output_type": "stream",
|
84 |
"text": [
|
85 |
+
"Running on local URL: http://127.0.0.1:7873\n",
|
86 |
"\n",
|
87 |
"To create a public link, set `share=True` in `launch()`.\n"
|
88 |
]
|
|
|
91 |
"data": {
|
92 |
"text/plain": []
|
93 |
},
|
94 |
+
"execution_count": 45,
|
95 |
"metadata": {},
|
96 |
"output_type": "execute_result"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
97 |
}
|
98 |
],
|
99 |
"source": [
|
|
|
107 |
" return dict(zip(categories, map(float, probs)))\n",
|
108 |
"\n",
|
109 |
"title = \"\"\"\n",
|
110 |
+
" # Er du i tvivl om at den øl du sidder med i hånden lige, nu er god?\n",
|
111 |
+
" ### Tvivl ej 68 års invotation inden for machine learning skal nok fortælle dig om øllen er god eller ej\n",
|
112 |
"\"\"\"\n",
|
113 |
"image = gr.Image(shape=(192, 192))\n",
|
114 |
"label = gr.Label()\n",
|
|
|
119 |
" inputs=image, \n",
|
120 |
" outputs=label, \n",
|
121 |
" examples=examples, \n",
|
122 |
+
" description=title,\n",
|
123 |
+
" title=\"Er du i tvivl om at den øl du sidder med i hånden lige nu er god? \"\n",
|
124 |
")\n",
|
125 |
"\n",
|
126 |
"iface.launch(inline=False)\n"
|