- Top features
- Generate full cell of code with gemini
- Expain error with gemini and Google search.
- Local connection
- Option 1: jupyter notebook (simpler than docker, but with limited functionalities)
jupyter notebook \
--NotebookApp.allow_origin='https://colab.research.google.com' \
--port=8888 \
--NotebookApp.port_retries=0
-
Settings
- Editor, check
- Enable code folding in the editor
- Enable code wrapper in the editor
- AI Assistance
- Consented to use generative AI features
- Editor, check
-
Free tiers:
- Limit seems reset every 12--24 hours.
- Better to buy compute credits and be frugal in usage.
- How to open termianl
- execute:
!pip install colab-xterm
%load_ext colabxterm
- in a new cell:
%xterm
- Install and launch ollama server
!pip install ollama
!curl -fsSL https://ollama.com/install.sh | sh
!nohup ollama serve & # no hang up
!ollama pull llama3.1
- In code:
import ollama
response = ollama.generate(model='gemma:2b', prompt='What is a qubit?')
print(response['response'])