This file contains 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 transformers gradio scipy ftfy "ipywidgets>=7,<8" datasets diffusers | |
import gradio as gr | |
import torch | |
from torch import autocast | |
from diffusers import StableDiffusionPipeline | |
model_id = "hakurei/waifu-diffusion" | |
device = "cuda" |
This file contains 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
# model: https://huggingface.co/osanseviero/BigGAN-deep-128 | |
# HF blog: https://huggingface.co/blog/gradio-spaces | |
# pip install gradio before running code below | |
import gradio as gr | |
gr.Interface.load("huggingface/osanseviero/BigGAN-deep-128").launch() |
This file contains 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
# launch your own Gradio Web Demo of Arcane style transfer by following the steps below | |
# open a jupyter notebook, code editor (vs code etc), or google colab | |
# pip install gradio | |
# copy the code below into a file or cell in a python notebook and run it | |
# that's it, a web demo will appear in your python notebook or web browser | |
# github: https://github.com/jjeamin/anime_style_transfer_pytorch | |
# HF blog: https://huggingface.co/blog/gradio-spaces | |
import gradio as gr |
This file contains 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
# blog: https://huggingface.co/blog/gradio-spaces | |
# pip install gradio before running the code below | |
import gradio as gr | |
title = "New AnimeganV2" | |
description = "this is a test" | |
gr.Interface.load("spaces/akhaliq/AnimeGANv2", title=title, description=description).launch() |
This file contains 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
# blog: https://huggingface.co/blog/gradio-spaces | |
# It's so easy to demonstrate a Machine Learning project thanks to Gradio. | |
# In this blog post, we'll walk you through: | |
# the recent Gradio integration that helps you demo models from the Hub seamlessly with few lines of code leveraging the Inference API. | |
# how to use Hugging Face Spaces to host demos of your own models. | |
# Hugging Face Hub Integration in Gradio | |
# You can demonstrate your models in the Hub easily. You only need to define the Interface that includes: |