Instructions to use BillyAggarwal/NeuralStyleTransfer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use BillyAggarwal/NeuralStyleTransfer with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://BillyAggarwal/NeuralStyleTransfer") - Notebooks
- Google Colab
- Kaggle
Download gradioapp from BillyAggarwal/NeuralStyleTransfer: direct link, hf CLI and curl.
- Browser
- Download file 496 Bytes
-
https://huggingface.co/BillyAggarwal/NeuralStyleTransfer/resolve/refs%2Fpr%2F1/gradioapp
- Command line
-
hf download hf://BillyAggarwal/NeuralStyleTransfer@refs/pr/1/gradioapp
-
curl -L -o gradioapp https://huggingface.co/BillyAggarwal/NeuralStyleTransfer/resolve/refs%2Fpr%2F1/gradioapp
496 Bytes
| import gradio as gr | |
| from huggingface_hub import InferenceClient | |
| client = InferenceClient("BillyAggarwal/NeuralStyleTransfer") | |
| def style_transfer(content_image, style_image): | |
| # send images to Hugging Face model | |
| result = client.post( | |
| json={"inputs": {"content": content_image, "style": style_image}} | |
| ) | |
| return result | |
| demo = gr.Interface( | |
| fn=style_transfer, | |
| inputs=[gr.Image(), gr.Image()], | |
| outputs=gr.Image(), | |
| title="Neural Style Transfer" | |
| ) | |
| demo.launch() |