Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
2
2023-029
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
2023-029
2023-029
Commits
99b3c77a
Commit
99b3c77a
authored
May 25, 2023
by
janithGamage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: update
parent
15ef1c04
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
24 deletions
+30
-24
Project/Backend/ML_Models/Learning_Model/API_Calculate_Similarity_Score-2.ipynb
...els/Learning_Model/API_Calculate_Similarity_Score-2.ipynb
+1
-1
Project/Backend/ML_Models/Learning_Model/API_Calculate_Similarity_Score-3.ipynb
...els/Learning_Model/API_Calculate_Similarity_Score-3.ipynb
+29
-23
No files found.
Project/Backend/ML_Models/Learning_Model/API_Calculate_Similarity_Score-2.ipynb
View file @
99b3c77a
...
...
@@ -214,7 +214,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.
10.9
"
"version": "3.
7.16
"
}
},
"nbformat": 4,
...
...
Project/Backend/ML_Models/Learning_Model/API_Calculate_Similarity_Score-3.ipynb
View file @
99b3c77a
...
...
@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count":
27
,
"execution_count":
39
,
"id": "3d735e52",
"metadata": {},
"outputs": [
...
...
@@ -11,8 +11,8 @@
"output_type": "stream",
"text": [
"Requirement already satisfied: fastapi in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (0.95.2)\n",
"Requirement already satisfied: starlette<0.28.0,>=0.27.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (0.27.0)\n",
"Requirement already satisfied: pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (1.10.8)\n",
"Requirement already satisfied: starlette<0.28.0,>=0.27.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from fastapi) (0.27.0)\n",
"Requirement already satisfied: typing-extensions>=4.2.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from pydantic!=1.7,!=1.7.1,!=1.7.2,!=1.7.3,!=1.8,!=1.8.1,<2.0.0,>=1.6.2->fastapi) (4.3.0)\n",
"Requirement already satisfied: anyio<5,>=3.4.0 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from starlette<0.28.0,>=0.27.0->fastapi) (3.5.0)\n",
"Requirement already satisfied: sniffio>=1.1 in c:\\users\\janithgamage\\.conda\\envs\\test\\lib\\site-packages (from anyio<5,>=3.4.0->starlette<0.28.0,>=0.27.0->fastapi) (1.2.0)\n",
...
...
@@ -27,7 +27,7 @@
},
{
"cell_type": "code",
"execution_count":
28
,
"execution_count":
40
,
"id": "8f281d93",
"metadata": {},
"outputs": [
...
...
@@ -52,7 +52,7 @@
},
{
"cell_type": "code",
"execution_count":
29
,
"execution_count":
41
,
"id": "97a4a52c",
"metadata": {},
"outputs": [
...
...
@@ -71,7 +71,7 @@
},
{
"cell_type": "code",
"execution_count":
30
,
"execution_count":
42
,
"id": "540c9e2f",
"metadata": {},
"outputs": [],
...
...
@@ -86,7 +86,7 @@
},
{
"cell_type": "code",
"execution_count":
31
,
"execution_count":
43
,
"id": "db756418",
"metadata": {},
"outputs": [],
...
...
@@ -105,7 +105,7 @@
},
{
"cell_type": "code",
"execution_count":
32
,
"execution_count":
44
,
"id": "fc83d1b8",
"metadata": {},
"outputs": [],
...
...
@@ -115,7 +115,7 @@
},
{
"cell_type": "code",
"execution_count":
33
,
"execution_count":
45
,
"id": "63dbfc01",
"metadata": {},
"outputs": [],
...
...
@@ -130,7 +130,7 @@
},
{
"cell_type": "code",
"execution_count":
34
,
"execution_count":
46
,
"id": "f7e5cdba",
"metadata": {},
"outputs": [],
...
...
@@ -172,7 +172,7 @@
},
{
"cell_type": "code",
"execution_count":
35
,
"execution_count":
47
,
"id": "d86a9515",
"metadata": {},
"outputs": [
...
...
@@ -187,7 +187,7 @@
")"
]
},
"execution_count":
35
,
"execution_count":
47
,
"metadata": {},
"output_type": "execute_result"
}
...
...
@@ -200,7 +200,7 @@
},
{
"cell_type": "code",
"execution_count":
36
,
"execution_count":
48
,
"id": "4b527135",
"metadata": {},
"outputs": [],
...
...
@@ -230,7 +230,7 @@
},
{
"cell_type": "code",
"execution_count":
37
,
"execution_count":
49
,
"id": "df08611e",
"metadata": {},
"outputs": [],
...
...
@@ -243,7 +243,7 @@
},
{
"cell_type": "code",
"execution_count":
38
,
"execution_count":
50
,
"id": "84b9601b",
"metadata": {},
"outputs": [
...
...
@@ -254,18 +254,24 @@
"INFO: Started server process [29948]\n",
"INFO: Waiting for application startup.\n",
"INFO: Application startup complete.\n",
"INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)\n"
"INFO: Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)\n",
"INFO: Shutting down\n",
"INFO: Waiting for application shutdown.\n",
"INFO: Application shutdown complete.\n",
"INFO: Finished server process [29948]\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"tensor([[2.0707e-08, 1.3095e-06, 4.2269e-09, 3.1405e-08, 7.0333e-13, 1.3519e-07,\n",
" 2.7351e-16, 9.9999e-01, 7.2929e-18, 5.1420e-11, 3.3166e-06, 1.7149e-09,\n",
" 4.6723e-10, 5.4727e-07, 3.0778e-10, 3.3862e-13]],\n",
" grad_fn=<SoftmaxBackward0>)\n",
"INFO: 127.0.0.1:52609 - \"POST /predict-similarity HTTP/1.1\" 200 OK\n"
"ename": "TypeError",
"evalue": "a coroutine was expected, got None",
"output_type": "error",
"traceback": [
"\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[1;31mTypeError\u001b[0m Traceback (most recent call last)",
"\u001b[1;32m~\\AppData\\Local\\Temp\\ipykernel_29948\\822276065.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0m__name__\u001b[0m \u001b[1;33m==\u001b[0m \u001b[1;34m\"__main__\"\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 2\u001b[0m \u001b[0mloop\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0masyncio\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mget_event_loop\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mloop\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mcreate_task\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0muvicorn\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mapp\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mhost\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;34m\"127.0.0.1\"\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mport\u001b[0m\u001b[1;33m=\u001b[0m\u001b[1;36m8001\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 4\u001b[0m \u001b[0mloop\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mrun_forever\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\Users\\JanithGamage\\.conda\\envs\\Test\\lib\\asyncio\\base_events.py\u001b[0m in \u001b[0;36mcreate_task\u001b[1;34m(self, coro)\u001b[0m\n\u001b[0;32m 402\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_check_closed\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 403\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_task_factory\u001b[0m \u001b[1;32mis\u001b[0m \u001b[1;32mNone\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 404\u001b[1;33m \u001b[0mtask\u001b[0m \u001b[1;33m=\u001b[0m \u001b[0mtasks\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0mTask\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0mcoro\u001b[0m\u001b[1;33m,\u001b[0m \u001b[0mloop\u001b[0m\u001b[1;33m=\u001b[0m\u001b[0mself\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 405\u001b[0m \u001b[1;32mif\u001b[0m \u001b[0mtask\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_source_traceback\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 406\u001b[0m \u001b[1;32mdel\u001b[0m \u001b[0mtask\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_source_traceback\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;33m-\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;32mc:\\Users\\JanithGamage\\.conda\\envs\\Test\\lib\\asyncio\\tasks.py\u001b[0m in \u001b[0;36m__init__\u001b[1;34m(self, coro, loop)\u001b[0m\n\u001b[0;32m 133\u001b[0m \u001b[1;31m# prevent logging for pending task in __del__\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 134\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_log_destroy_pending\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m--> 135\u001b[1;33m \u001b[1;32mraise\u001b[0m \u001b[0mTypeError\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34mf\"a coroutine was expected, got {coro!r}\"\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m\u001b[0;32m 136\u001b[0m \u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m 137\u001b[0m \u001b[0mself\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0m_must_cancel\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;32mFalse\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n",
"\u001b[1;31mTypeError\u001b[0m: a coroutine was expected, got None"
]
}
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment