Google colab change form parameters
See original GitHub issueI had a question which I asked here: https://stackoverflow.com/questions/68957902/google-colab-change-form-parameters, and it was not answered, therefore I guess this feature is not present in colab till now.
Therefore I would really like if making this feature would be possible, as it is needed.
Pasting the question from Stackoverflow
Google colab form has a powerful feature called Forms, https://colab.research.google.com/notebooks/forms.ipynb.
In that there is a dropdown option too, I want to modify the options of the drop-down list via code.
Is it possible to do so colab?
Example it should work in this manner:
n = input('Give a number : ')
arr = list(range(n))
dropdown = arr[0] #@param arr
I have tried the above code but it won’t work simply because the param list is after #
, hence it commented as python cant reach till there.
If not should I use Jupyter Widgets? Would they be efficient, fast, and most importantly re-run cells on change?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
jupyter notebook - Google colab change form parameters
In that there is a dropdown option too, I want to modify the options of the drop-down list via code. Is it possible...
Read more >Forms - Colaboratory
Forms provide an easy way to parameterize code. From a code cell, select Insert → Add form field. When you change the value...
Read more >Google Colab - Adding Forms
Google Colab - Adding Forms, Colab provides a very useful utility called Forms ... Try changing this to a different value and Run...
Read more >Welcome to Google Colab: Tricks and Tweaks (Part 3)
Try changing this to a different value and Run all to see its effect. Inputting Text. To accept a text input in your...
Read more >adding a form to google colab to speed creation of ... - YouTube
Check out Horst's web page. He's a great guy and can help you learn how to code!https://spielend-programmieren.at/
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A simple example is something like: https://colab.research.google.com/gist/blois/71aa984fdab9a0b2ef6c9438dc06382e/altair-stock-comparison.ipynb
This is using
@interact
, but you can also use the Output widget to scope what is being cleared- https://ipywidgets.readthedocs.io/en/latest/examples/Output Widget.htmlFor future references, can this issue stay open or mark it as feature request, please? - other users might be interested in this feature, too.
I’m searching about how to use
ipywidgets
in Google Colab, because, I have this scenario:What would be the correct approach in Google Colab for the described scenario?