Files changed (1) hide show
  1. gradioapp +20 -0
gradioapp ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from huggingface_hub import InferenceClient
3
+
4
+ client = InferenceClient("BillyAggarwal/NeuralStyleTransfer")
5
+
6
+ def style_transfer(content_image, style_image):
7
+ # send images to Hugging Face model
8
+ result = client.post(
9
+ json={"inputs": {"content": content_image, "style": style_image}}
10
+ )
11
+ return result
12
+
13
+ demo = gr.Interface(
14
+ fn=style_transfer,
15
+ inputs=[gr.Image(), gr.Image()],
16
+ outputs=gr.Image(),
17
+ title="Neural Style Transfer"
18
+ )
19
+
20
+ demo.launch()