首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将Azure功能与我自己的模型连接起来?可以使用Azure存储吗?

如何将Azure功能与我自己的模型连接起来?可以使用Azure存储吗?
EN

Stack Overflow用户
提问于 2021-01-05 21:22:46
回答 1查看 226关注 0票数 0

简介

我在本地创建了自己的模型,然后注册它并将其部署到azure中,这样它就能工作了。

已部署的模型输出:

我的方法

我使用了本教程,我想在Azure函数中使用我的模型,我可以这样做:

代码语言:javascript
复制
def main(req: func.HttpRequest, msg: func.Out[func.QueueMessage]) -> str:
    name = req.params.get('name')
    scoring_uri = 'http://1f72b1bf-5ca9-42d9-bedd-f41773591a4f.francecentral.azurecontainer.io/score'
    headers = {'Content-Type':'application/json'}
    test_data = json.dumps({'text': 'Today is a great day!'})
    response = requests.post(scoring_uri, data=test_data, headers=headers)

if not name:
    try:
        req_body = req.get_json()
    except ValueError:
        pass
    else:
        name = req_body.get('name')

if name:
    msg.set(name)
    return func.HttpResponse(f"Hello {name}! Najlepszy wynik: {response.json()}")
else:
    return func.HttpResponse(
        "Please pass a name on the query string or in the request body",
        status_code=400
    )

问题

  1. 我的用法正确吗?
  2. 模型存储可以使用天蓝色存储吗?如何实现?
  3. 在Azure函数中还有其他方法来使用这个模型吗?

我想知道,因为我已经在要求中指定我应该使用天蓝色功能和天蓝色存储。我不明白为什么。

EN

回答 1

Stack Overflow用户

发布于 2021-02-01 05:23:05

目前,将ML模型部署到Azure函数正在预览中。https://learn.microsoft.com/en-us/azure/machine-learning/how-to-deploy-functions

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65586756

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档