Skip to content

Instantly share code, notes, and snippets.

View ingridstevens's full-sized avatar

Ingrid Stevens ingridstevens

View GitHub Profile
@ingridstevens
ingridstevens / ui.py
Created February 20, 2024 11:47
Gradio UI for Stable Diffusion in MLX
# ----------------
# ui.py
# ----------------
import gradio as gr
from PIL import Image
import numpy as np
import mlx.core as mx
from stable_diffusion import StableDiffusion
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ingridstevens
ingridstevens / apple-silicon.preset.json
Created December 13, 2023 11:19
Apple Metal (GPU Acceleration on) + use_mlock = off
{
"name": "Apple Silicon",
"load_params": {
"n_ctx": 2048,
"n_batch": 512,
"rope_freq_base": 10000,
"rope_freq_scale": 1,
"n_gpu_layers": 1,
"use_mlock": false,
"main_gpu": 0,
@ingridstevens
ingridstevens / translate.ipynb
Last active November 24, 2022 18:59
Translation + Sentiment Analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ingridstevens
ingridstevens / regex.ipynb
Last active November 24, 2022 18:57
Regex out of a file into a pandas dataframe into csv
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
# converts and saves youtube video to mp3
function convert_to_mp3() {
#ensure the video is downloaded to the correct location (youtube folder in Downloads)
if [ -d "~/Downloads/youtube" ]; then
cd ~/Downloads/youtube
else