The new Form feature in Google Colaboratory

后端 未结 5 776
你的背包
你的背包 2021-01-02 05:59

Can someone explain or give a notebook example how to use the new Form feature? It looks really exciting, but I cannot find any example or even an announcement anyw

5条回答
  •  我在风中等你
    2021-01-02 06:32

    It's a useful and simple features to input values in Colab notebooks, still not described in Colab documentation.

    For example I have a notebook to run instance segmentation of an image. To specify image url, before I had to modify a python variable like this:

    image_url = 'http://example.com/image.jpg'
    

    Now I can make a user friendly form field ("+field" button) with values:

    • Variable name = image_url
    • Variable type = string
    • Form field type = input

    Then switch to form visualization (dropdown near "+field" button) to visualize only form during notebook execution.

提交回复
热议问题