发布Python笔记本作为Azure Web服务

2024-04-25 13:48:29 发布

您现在位置:Python中文网/ 问答频道 /正文

有人有一个简单的helloworld Python笔记本作为web服务发布吗

我试过了,却犯了各种各样的错误

from azureml import services #from azure.storage.blob import BlobService services._DEBUG = True #Use your own workspace information below! workpace_id= '*****' auth_token = '*****' from azureml import services @services.publish(workpace_id, auth_token) @services.types() @services.returns(str) def myHello(): return 'Hello World'

Tags: fromimporttokenauthwebid错误service
1条回答
网友
1楼 · 发布于 2024-04-25 13:48:29

我建议你看看this article

If the type information is not provided a Python specific format will be used and other languages may not be able to call the sevice.

如果返回类型为“str”,请注意。您将获得字节值。以下是我的结果: enter image description here

相关问题 更多 >