Commit 4531590e authored by chameera's avatar chameera

Handwriting model

parent bcb9c50c
{"cells":[{"cell_type":"code","execution_count":null,"metadata":{"id":"6pajsg8Fie5S"},"outputs":[],"source":["import cv2\n","import numpy as np\n","from keras.models import load_model\n","from PIL import Image\n","import requests\n","import matplotlib.pyplot as plt\n","from io import BytesIO\n","from tensorflow.keras.applications.resnet50 import preprocess_input\n","import imutils\n"]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":542,"status":"ok","timestamp":1702626602134,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"j2u2Ou-HjNoa","colab":{"base_uri":"https://localhost:8080/"},"outputId":"0c6866c8-421d-42ea-c443-02b54fb70e09"},"outputs":[{"output_type":"stream","name":"stdout","text":["Writing Handwriting_recognition.py\n"]}],"source":["#%%writefile Handwriting_recognition.py\n","\n","import cv2\n","import numpy as np\n","from keras.models import load_model\n","from PIL import Image\n","\n","\n","# Load the saved model\n","model = load_model('/content/drive/MyDrive/Work_space/Silverline_IT/Project/Learn_Joy/function2/fun2_model/Handwriting_recognition_1/Handwriting_recognition_1.hdf5')\n","\n","\n","\n","def Handwriting_recognition(BB_image:str=None,WB_image:str=None):\n","\n","\n"," if WB_image is not None:\n","\n"," # Load the test image\n"," image = cv2.imread(WB_image)\n"," # Preprocess the image\n"," if image is not None:\n"," #image = cv2.imread(img_path)\n"," gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n"," thresh = cv2.threshold(gray, 0, 255,cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1]\n"," thresh = cv2.resize(thresh, (32, 32), interpolation = cv2.INTER_CUBIC)\n"," thresh = thresh.astype(\"float32\") / 255.0\n"," thresh = np.expand_dims(thresh, axis=-1)\n"," thresh = thresh.reshape(1,32,32,1)\n","\n"," else:\n"," print(\"Invalid or empty image.\")\n","\n","\n"," elif BB_image is not None:\n","\n"," # Load the test image\n"," image = cv2.imread(BB_image)\n","\n"," # Preprocess the image\n"," if image is not None:\n"," #image = cv2.imread(img_path)\n"," image = cv2.resize(cv2.cvtColor(image, cv2.COLOR_BGR2RGB),dsize=(32,32))\n"," image_gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n"," (thresh, image_binary) = cv2.threshold(image_gray, 128, 255, cv2.THRESH_BINARY | cv2.THRESH_OTSU)\n"," image_binary = cv2.threshold(image_gray, thresh, 255, cv2.THRESH_BINARY)[1]\n"," thresh = np.array(image_binary)/255.0\n"," thresh = thresh.reshape(-1,32,32,1)\n","\n","\n"," else:\n"," print(\"Invalid or empty image.\")\n","\n"," else:\n"," pass\n","\n"," # Make predictions\n"," predictions = model.predict(thresh)\n"," #print(predictions)\n"," #print(np.argmax(predictions,axis=1))\n","\n"," # Check the shape of predictions\n"," #print(\"Shape of predictions:\", predictions[0].shape)\n","\n"," classes=['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']\n"," lable_nu=list(range(0,len(classes)))\n"," real_lB=dict(zip(lable_nu,classes))\n"," #print(real_lB)\n","\n"," predicted_class = np.vectorize(real_lB.get)(np.argmax(predictions,axis=1))\n"," #print(predicted_class)\n","\n"," return {\"Recognized Character\":predicted_class[0]}\n","\n"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":984,"status":"ok","timestamp":1702611194909,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"mqZIbWYY7nm2","outputId":"0141bae3-3f9f-441c-a449-072e7732dff3"},"outputs":[{"name":"stdout","output_type":"stream","text":["1/1 [==============================] - 0s 81ms/step\n"]},{"data":{"text/plain":["{'Recognized Character': 'A'}"]},"execution_count":4,"metadata":{},"output_type":"execute_result"}],"source":["Handwriting_recognition(\"/content/drive/MyDrive/Work_space/Data set/Learn_Joy/function2/Predict/2313.jpg\")"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":5059,"status":"ok","timestamp":1702611191208,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"nVoTmDYD_cjU","outputId":"355070ce-c738-4a25-db36-12151e9c4dc7"},"outputs":[{"name":"stdout","output_type":"stream","text":["1/1 [==============================] - 0s 190ms/step\n"]},{"data":{"text/plain":["{'Recognized Character': 'T'}"]},"execution_count":3,"metadata":{},"output_type":"execute_result"}],"source":["Handwriting_recognition(WB_image=\"/content/drive/MyDrive/Work_space/Data set/Learn_Joy/function2/Predict/img030-047.png\")"]},{"cell_type":"markdown","metadata":{"id":"4ZD0Z_PMb_gK"},"source":["##Predict with bounding box & white bachground"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"t_wTnH1o1Rbq"},"outputs":[],"source":["def sort_contours(cnts, method=\"left-to-right\"):\n"," reverse = False\n"," i = 0\n"," if method == \"right-to-left\" or method == \"bottom-to-top\":\n"," reverse = True\n"," if method == \"top-to-bottom\" or method == \"bottom-to-top\":\n"," i = 1\n"," boundingBoxes = [cv2.boundingRect(c) for c in cnts]\n"," (cnts, boundingBoxes) = zip(*sorted(zip(cnts, boundingBoxes),\n"," key=lambda b:b[1][i], reverse=reverse))\n","\n"," return (cnts, boundingBoxes)"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"UXQDSxifuqgs"},"outputs":[],"source":["#image = cv2.imread()\n","\n","model = load_model('/content/drive/MyDrive/Work_space/Silverline_IT/Project/Learn_Joy/function2/fun2_model/Handwriting_recognition_1/Handwriting_recognition_1.hdf5')\n","\n","def get_letters(img):\n"," letters = []\n"," total_bbox_cordi = []\n"," image = cv2.imread(img)\n"," gray = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)\n"," ret,thresh1 = cv2.threshold(gray ,127,255,cv2.THRESH_BINARY_INV)\n"," dilated = cv2.dilate(thresh1, None, iterations=2)\n","\n"," cnts = cv2.findContours(dilated.copy(), cv2.RETR_EXTERNAL,cv2.CHAIN_APPROX_SIMPLE)\n"," cnts = imutils.grab_contours(cnts)\n"," cnts = sort_contours(cnts, method=\"left-to-right\")[0]\n","\n"," for c in cnts:\n"," if cv2.contourArea(c) > 10:\n"," (x, y, w, h) = cv2.boundingRect(c)\n"," print([x,y,w,h])\n"," single_bbox_cordi = [x,y,w,h]\n"," total_bbox_cordi.append(single_bbox_cordi)\n"," cv2.rectangle(image, (x, y), (x + w, y + h), (0, 255, 0), 2)\n"," roi = gray[y:y + h, x:x + w]\n"," thresh = cv2.threshold(roi, 0, 255,cv2.THRESH_BINARY_INV | cv2.THRESH_OTSU)[1]\n"," thresh = cv2.resize(thresh, (32, 32), interpolation = cv2.INTER_CUBIC)\n"," thresh = thresh.astype(\"float32\") / 255.0\n"," thresh = np.expand_dims(thresh, axis=-1)\n"," thresh = thresh.reshape(1,32,32,1)\n"," ypred = model.predict(thresh)\n"," #ypred = LB.inverse_transform(ypred)\n"," [x] = ypred\n"," letters.append(x)\n"," return ypred, image, total_bbox_cordi"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":483,"status":"ok","timestamp":1702566070631,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"W8g-434_0_VN","outputId":"ca905f9a-8e8c-457d-bdf3-5e612da69858"},"outputs":[{"name":"stdout","output_type":"stream","text":["[460, 261, 422, 375]\n","1/1 [==============================] - 0s 23ms/step\n"]}],"source":["letter,image,total_bbox_cordi = get_letters('/content/drive/MyDrive/Work_space/Data set/Learn_Joy/function2/Predict/img027-034.png')"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":16,"status":"ok","timestamp":1702566072608,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"2L294BJ91ytw","outputId":"8ad0a604-58cf-419f-fc26-7ee4880aef31"},"outputs":[{"name":"stdout","output_type":"stream","text":["[[6.5416185e-05 1.6269371e-09 5.9041672e-04 1.1789890e-08 1.6744872e-07\n"," 1.2843116e-08 4.3512742e-07 8.7157115e-10 9.3695093e-08 1.7395679e-07\n"," 1.3048541e-03 5.8992364e-06 1.0420042e-06 1.1702650e-03 9.9977512e-08\n"," 1.6490534e-07 3.8444973e-04 1.2546275e-08 7.7148997e-08 1.8157302e-06\n"," 9.0535551e-11 2.1660206e-08 6.8394826e-08 2.4115893e-06 2.4366493e-06\n"," 9.9644524e-01 5.0177903e-07 2.9452164e-07 8.7145813e-10 1.6614571e-06\n"," 1.5226144e-08 2.1720891e-05 2.1708865e-10 5.4405479e-08 1.8828146e-07]]\n"]}],"source":["print(letter)"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":487},"executionInfo":{"elapsed":2367,"status":"ok","timestamp":1702566154598,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"Bp2tzAA1128l","outputId":"9b1ba58b-138e-40c6-e203-4c155f49ccd4"},"outputs":[{"name":"stdout","output_type":"stream","text":["[25]\n","[[460, 261, 422, 375]]\n"]},{"data":{"text/plain":["<matplotlib.image.AxesImage at 0x7de7d293c3d0>"]},"execution_count":63,"metadata":{},"output_type":"execute_result"},{"data":{"image/png":"iVBORw0KGgoAAAANSUhEUgAAAiQAAAGiCAYAAADX8t0oAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABJtklEQVR4nO3deVyU5d4/8M8MywDqDIsyIwmGpSIuaWI4aasEKlmdSNOHzJKTZWBux5STYY8teOyUuWKnTX9HXE9paS4hKmYiGqm54prgMqAiM6KyzVy/P3qY06QW6HBfDHzer9f9Oof7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RkpAJ7Id/Vq1ehVjv+yXZzc4PNZgPAcbwVzhozo9GIrVu3orKy0t4mIyMD7du35+Ga2pB9Vm1tLV26VGg0GrFgwQJx8OBBMWLECOHr6+twJUNjNnLkSKHT6cSWLVvEuXPn7MvVq1ftbV555RUREhIiNm3aJH788UdhNBqF0Wi0b6++XDU6Olrs2bNHrF+/XrRo0aLRXa76e7+9ykYIjmNN7dy5U7i7u4t3331XHD16VKSnpwsfHx+xaNEie5tp06YJX19f8fXXX4uff/5ZPPnkkze89LJbt24iJydHbNu2TbRt27ZBX676e8OGDRN33HGH/bLfr776SjRv3ly8/vrr9jYcx+tdvnxZ7N69W+zevVsAEB9++KHYvXu3OHXqlBDCOWNWUlIi9Hq9GDp0qNi/f79YunSp8PHx4WW/teRygUQIIWbPni1CQkKEp6enuO+++8SOHTtkl1RvALjh8sUXX9jbXLt2Tbz66qvCz89P+Pj4iL/85S/i3LlzDu/zyy+/iH79+glvb2/RvHlzMX78eFFZWanw3tQvvw8kHMeaW716tejUqZPQaDQiLCxM/Otf/3LYbrPZxJtvvin0er3QaDSiT58+Ii8vz6HNxYsXxZAhQ0TTpk2FVqsVL774orh8+bKSuyGVxWIRo0ePFiEhIcLLy0u0adNGvPHGGw6XmnIcr7d58+Yb/k0cNmyYEMJ5Y7Z3717Ru3dvodFoxB133CGmTZum1C42GCohfnObPyIiIiIJXOocEiIiImqYGEiIiIhIOgYSIiIiko6BhIiIiKRjICEiIiLpGEiIiIhIOgYSIiIiko6BhIiIiKRjICEiIiLpGEiIiIhIOgYSIiIiku7/A2ENb8+nrKWYAAAAAElFTkSuQmCC\n","text/plain":["<Figure size 640x480 with 1 Axes>"]},"metadata":{},"output_type":"display_data"}],"source":["print(np.argmax(letter,axis=1))\n","print(total_bbox_cordi)\n","plt.imshow(image)"]},{"cell_type":"markdown","metadata":{"id":"TRKxPN7e_7gh"},"source":["##Fast API"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"executionInfo":{"elapsed":35668,"status":"ok","timestamp":1702611234404,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"qG1kwa3_CvGR","outputId":"9ddaaf93-5abd-4764-fc6b-65739937cc64"},"outputs":[{"name":"stdout","output_type":"stream","text":["Collecting python-multipart\n"," Downloading python_multipart-0.0.6-py3-none-any.whl (45 kB)\n","\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/45.7 kB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m45.7/45.7 kB\u001b[0m \u001b[31m2.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25hInstalling collected packages: python-multipart\n","\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","lida 0.0.10 requires fastapi, which is not installed.\n","lida 0.0.10 requires kaleido, which is not installed.\n","lida 0.0.10 requires uvicorn, which is not installed.\u001b[0m\u001b[31m\n","\u001b[0mSuccessfully installed python-multipart-0.0.6\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m93.1/93.1 kB\u001b[0m \u001b[31m2.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.0/67.0 kB\u001b[0m \u001b[31m4.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","lida 0.0.10 requires kaleido, which is not installed.\n","lida 0.0.10 requires uvicorn, which is not installed.\n","tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.9.0 which is incompatible.\u001b[0m\u001b[31m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.7/59.7 kB\u001b[0m \u001b[31m2.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m7.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n","\u001b[?25h\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n","lida 0.0.10 requires kaleido, which is not installed.\u001b[0m\u001b[31m\n","\u001b[0mRequirement already satisfied: nest-asyncio in /usr/local/lib/python3.10/dist-packages (1.5.8)\n"]}],"source":["!pip install python-multipart\n","!pip install fastapi -q\n","!pip install pyngrok -q\n","!pip install uvicorn -q\n","!pip install pydantic -q\n","!pip install nest-asyncio"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"iohU7kEWEd70"},"outputs":[],"source":["from fastapi import FastAPI\n","from pydantic import BaseModel\n","import uvicorn\n","from pyngrok import ngrok\n","import nest_asyncio"]},{"cell_type":"code","execution_count":null,"metadata":{"executionInfo":{"elapsed":507,"status":"ok","timestamp":1702626629090,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"},"user_tz":-330},"id":"s_KwQ1_t__TY","colab":{"base_uri":"https://localhost:8080/"},"outputId":"335c81d6-d9e2-4a3b-db4f-0bf341d952af"},"outputs":[{"output_type":"stream","name":"stdout","text":["Writing app02.py\n"]}],"source":["#%%writefile app02.py\n","from fastapi import FastAPI\n","from fastapi import File, UploadFile\n","from typing import List\n","from pydantic import BaseModel\n","import uvicorn\n","\n","\n","import cv2\n","import tempfile\n","import os\n","import shutil\n","\n","app=FastAPI(title=\"Learn Joy\",\n"," description=\"FastAPI for Learn_Joy\",\n"," version=\"0.104.1\")\n","\n","\n","\n","@app.get(\"/\")\n","async def root():\n"," return{\"Fast API\":\"Hello World\"}\n","\n","\n","@app.post(\"/function02/recognition_BB\")\n","async def function2_recognition(BB_image:UploadFile =File(...)):\n"," out_put={}\n"," temp_dir = tempfile.mkdtemp()\n","\n"," # Create a temporary file path foe doner file\n"," BB_image_path = os.path.join(temp_dir,BB_image.filename)\n","\n"," # Write the uploaded file content to the temporary file\n"," with open(BB_image_path, \"wb\") as temp_file1:\n"," shutil.copyfileobj(BB_image.file, temp_file1)\n","\n"," out_put= Handwriting_recognition(BB_image=BB_image_path,WB_image=None)\n","\n","\n"," # Clean up: Remove the temporary directory and its contents\n"," shutil.rmtree(temp_dir)\n","\n"," return out_put\n","\n","@app.post(\"/function02/recognition_WB\")\n","async def function2_recognition(WB_image:UploadFile =File(...)):\n"," out_put={}\n"," # Create a temporary directory\n"," temp_dir = tempfile.mkdtemp()\n"," WB_image_path = os.path.join(temp_dir,WB_image.filename)\n","\n"," # Write the uploaded file content to the temporary file\n"," with open(WB_image_path, \"wb\") as temp_file2:\n"," shutil.copyfileobj(WB_image.file, temp_file2)\n","\n","\n"," out_put= Handwriting_recognition(BB_image=None,WB_image=WB_image_path)\n","\n"," # Clean up: Remove the temporary directory and its contents\n"," shutil.rmtree(temp_dir)\n","\n","\n"," return out_put"]},{"cell_type":"code","execution_count":null,"metadata":{"id":"zFoJ5KojCrn3"},"outputs":[],"source":["ngrok.set_auth_token(\"2YX5IJustLB5zcqU9rbzA9iZLVf_86pZKjHT2kXNELQgLRkyi\")"]},{"cell_type":"code","execution_count":null,"metadata":{"colab":{"base_uri":"https://localhost:8080/"},"id":"w2y_Zbs9Ctlh","executionInfo":{"status":"ok","timestamp":1702625055784,"user_tz":-330,"elapsed":31613,"user":{"displayName":"Kaushi Gihan","userId":"11214181140146971518"}},"outputId":"e329e6ff-039b-4833-abe8-a787c63cf7e5"},"outputs":[{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["Public URL: https://9c75-34-16-185-214.ngrok-free.app\n"]},{"metadata":{"tags":null},"name":"stderr","output_type":"stream","text":["INFO: Started server process [2017]\n","INFO: Waiting for application startup.\n","INFO: Application startup complete.\n","INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)\n"]},{"metadata":{"tags":null},"name":"stdout","output_type":"stream","text":["INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"GET / HTTP/1.1\" 200 OK\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"GET / HTTP/1.1\" 200 OK\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"GET /favicon.ico HTTP/1.1\" 404 Not Found\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"GET /docs HTTP/1.1\" 200 OK\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"GET /openapi.json HTTP/1.1\" 200 OK\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"GET /docs HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 58ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_WB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_WB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_WB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_WB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 20ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_WB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 21ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 18ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 19ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 14ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 18ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 20ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 18ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 14ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 20ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 20ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 15ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 14ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 17ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 19ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n","1/1 [==============================] - 0s 16ms/step\n","INFO: 2402:4000:21c3:1fa7:18b1:f959:46a6:6c1d:0 - \"POST /function02/recognition_BB HTTP/1.1\" 200 OK\n"]},{"output_type":"stream","name":"stderr","text":["INFO: Shutting down\n","INFO: Waiting for application shutdown.\n","INFO: Application shutdown complete.\n","INFO: Finished server process [2017]\n"]}],"source":["ngrok_tunnel = ngrok.connect(8000)\n","print('Public URL:', ngrok_tunnel.public_url)\n","nest_asyncio.apply()\n","uvicorn.run(app, port=8000)"]}],"metadata":{"colab":{"collapsed_sections":["4ZD0Z_PMb_gK"],"provenance":[],"mount_file_id":"1BpT_sd4w1-FwnK-TfsP5vTkDaM5_DE62","authorship_tag":"ABX9TyPh9OwNrIbVLI5ImSKsM1N8"},"kernelspec":{"display_name":"Python 3","name":"python3"},"language_info":{"name":"python"}},"nbformat":4,"nbformat_minor":0}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment