This commit is contained in:
Your Name
2021-02-08 11:17:02 +00:00
parent 7085b7ef54
commit 54ccb1423f
28 changed files with 136 additions and 52 deletions
+11 -2
View File
@@ -350,7 +350,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
@@ -394,7 +394,9 @@
"outputs": [],
"source": [
"headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}\n",
"ip_address = socket.gethostbyname(socket.gethostname())"
"ip_address = socket.gethostbyname(socket.gethostname()) + ':8080'\n",
"\n",
"ip_address"
]
},
{
@@ -425,6 +427,13 @@
"r = requests.post(f\"http://{ip_address}/api\", data=record, headers=headers)\n",
"r.text"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
+9 -2
View File
@@ -42,7 +42,7 @@
},
"outputs": [],
"source": [
"ip_address = socket.gethostbyname(socket.gethostname())\n",
"ip_address = socket.gethostbyname(socket.gethostname()) + ':8080'\n",
"ip_address"
]
},
@@ -99,7 +99,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
@@ -244,6 +244,13 @@
"r_not_empty = requests.post(f\"http://{ip_address}/empty\", data=not_empty_json, headers=headers)\n",
"r_not_empty.text"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
+3 -3
View File
@@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"file_url = '../dataset/breast-cancer-wisconsin.data'"
"file_url = '../Dataset/breast-cancer-wisconsin.data'"
]
},
{
@@ -304,7 +304,7 @@
},
"outputs": [],
"source": [
"ip_address = socket.gethostbyname(socket.gethostname())\n",
"ip_address = socket.gethostbyname(socket.gethostname()) + '8080'\n",
"ip_address"
]
},
@@ -377,7 +377,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
+5 -3
View File
@@ -25,7 +25,7 @@
},
"outputs": [],
"source": [
"file_url = '../dataset/breast-cancer-wisconsin.data'"
"file_url = '../Dataset/breast-cancer-wisconsin.data'"
]
},
{
@@ -378,7 +378,7 @@
},
"outputs": [],
"source": [
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':80})\n",
"flask_thread = threading.Thread(target=app.run, kwargs={'host':'0.0.0.0','port':8080})\n",
"flask_thread.start()"
]
},
@@ -422,7 +422,9 @@
"outputs": [],
"source": [
"headers = {'content-type': 'application/json', 'Accept-Charset': 'UTF-8'}\n",
"ip_address = socket.gethostbyname(socket.gethostname())"
"ip_address = socket.gethostbyname(socket.gethostname()) + ':8080' \n",
"\n",
"ip_address"
]
},
{