(self)
| 39 | # 获得股票数据内容。 |
| 40 | class GetPredictionDataHandler(webBase.BaseHandler): |
| 41 | def get(self): |
| 42 | # 获得分页参数。 |
| 43 | img_url = self.get_argument("img_url", default=0, strip=False) |
| 44 | print(img_url) |
| 45 | img_obj = Image.open("/data/stock/web" + img_url) |
| 46 | print("img_obj", img_obj) |
| 47 | server = "0.0.0.0:8500" |
| 48 | prediction = do_inference(server, img_obj) |
| 49 | print('######### prediction : ', prediction) |
| 50 | self.write(json.dumps(prediction)) |
| 51 | |
| 52 | |
| 53 | # 获得股票数据内容。 |
nothing calls this directly
no test coverage detected