This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Setup: | |
| # conda create -n whisper python=3.9 | |
| # conda activate whisper | |
| # https://github.com/openai/whisper | |
| # pip install git+https://github.com/openai/whisper.git | |
| # Usage: | |
| # python whisper-audio-to-text.py --audio_dir my_files --out_dir texts | |
| import argparse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # pip install openai | |
| import openai | |
| import os | |
| # export API key environment variable before | |
| # running this script (see https://platform.openai.com/account/api-keys) | |
| # E.g., | |
| # | |
| # export OPENAI_API_KEY=copy_paste_key_from_your_account |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch.nn as nn | |
| class Transformer(nn.Module): | |
| def __init__(self, ...): | |
| super().__init__() | |
| ... | |
| self.encoder_layers = nn.ModuleList(...) | |
| self.decoder_layers = nn.ModuleList(...) | |
| ... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Sebastian Raschka 2025 | |
| # | |
| # | |
| # Usage: | |
| # python llama-vs-gemma.py \ | |
| # --auth_token hf_... \ | |
| # --model_name meta-llama/Llama-3.2-1B \ | |
| # --prompt medium | |
| import argparse |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer