Running SDXL-Lightning on Google Colab
SDXL Lightning - a Hugging Face Space by AP123 Discover amazing ML apps made by the communityhuggingface.co The following image was generated by SDXL-Lightning. !git clone https://huggingface.co/spaces/AP123/SDXL-Lightning cd SDXL-Lightning !pip install transformers diffusers accelerate gradio We will need to add share=True to launch()before running app.py. !python app.py This will take some time since the Gradio app will need to download a few models.
Use CSS with Gradio
What is Gradio? Gradio is the fastest way to demo your machine learning model with a friendly web interface so that anyone can use it, anywhere! import gradio as gr def greet(name): return "Hello " + name + "!" demo = gr.Interface(fn=greet, inputs="text", outputs="text") demo.launch() import gradio as gr def load_css(): with open('style.css', 'r') as file: css_content = file.read() return css_content def greet(name): return "Hello " + name + "!" demo = gr.Interface(fn=greet, inputs="text", outputs="text", css=load_css()) demo.launch()
Tried a small multimodal, imp-v1–3b on Google Colab
MILVLG/imp-v1-3b · Hugging Face We're on a journey to advance and democratize artificial intelligence through open source and open science.huggingface.co Install dependencies !pip install -U transformers !pip install -q pillow accelerate einops 2. Load the model and set instruction Before running the following, you will need to upload an image you want to try with imp-v1–3b. import torch from transformers import AutoModelForCausalLM, AutoTokenizer from PIL import Image torch.set_default_device("cuda") model = AutoModelForCausalLM.from_pretrained(…
Add Colors to Black-White picture with DDColor
DDColor can provide vivid and natural colorization for historical black and white old photos. GitHub - piddnad/DDColor: [ICCV 2023] Official implementation of "DDColor: Towards Photo-Realistic… ICCV 2023] Official implementation of "DDColor: Towards Photo-Realistic Image Colorization via Dual Decoders" - GitHub…github.com In this post, I’ll introduce how to run DDColor on Google Colab free-tier, T4.
Sync GitHub repo and Hugging Face Space Repo with GitHub Actions
I’ve used Hugging Face Space for my daily job. However, right now only 2 people are using repos, so we are updating the main branch directly since Hugging Face repo’s git system is totally different from GitHub and it’s not really software engineer friendly. They have their own system. Our…
Only 30 lines Create a Simple ChatBot with Gemini Pro API and Streamlit
In this post, I will introduce how to create a simple chat bot with Gemini Pro API and Streamlit Requirements python 3.9+ API Key https://makersuite.google.com/app/apikey google-generativeai https://pypi.org/project/google-generativeai/ Streamlit https://streamlit.io/ Hugging Face account (if you want to host the app) https://huggingface.co/ 1. Install packages First, we will need to install packages that I…
Coursera FREE courses on AI
AI For Everyone AI For Everyone Offered by DeepLearning.AI. AI is not only for engineers. If you want your organization to become better at using AI…www.coursera.org Machine Learning for All Machine Learning for All Offered by University of London. Machine Learning, often called Artificial Intelligence or AI, is one of the most…www.coursera.org Generative AI for Everyone Generative AI for Everyone Offered by DeepLearning.AI. Instructed by AI pioneer Andrew Ng, Generative AI for Everyone offers his unique…www.coursera.org
Effortless Image Background Removal App with Less Than 20 Lines of Python
In this post, I will introduce you to an application that can remove background from an image. The application is on Huggingface space. RemoveBG - a Hugging Face Space by baxin Discover amazing ML apps made by the communityhuggingface.co Requirements python ( Gradio requires python 3.8 or higher, I used 3.10.6) Gradio rembg Huggingface account (if you want to host the app on Huggingface space) Install Packages
Let’s take a tally on your PR this year!
A co-worker posted how many lines she added/deleted to the repo in 2023. I just wrote a simple Python script to check PRs. The requirement is GitHub CLI. GitHub - cli/cli: GitHub's official command line tool GitHub's official command line tool. Contribute to cli/cli development by creating an account on GitHub.github.com The following script requires github id, repo owner, repo name and limit as input.