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:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://BillyAggarwal/NeuralStyleTransfer") - Notebooks
- Google Colab
- Kaggle
File size: 507 Bytes
baefd6b 8c7bfb0 baefd6b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import gradio as gr
from huggingface_hub import InferenceClient
client = InferenceClient("BillyAggarwal/NeuralStyleTrasnferModel.keras")
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() |