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
Create gradioapp (#1)
Browse files- Create gradioapp (3ef02c29f2bfc72e9db0a7ebb4cd6c2788e14f38)
1234567891011121314151617181920import gradio as grfrom 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()gradioappAdded+20