Podtekatel commited on
Commit
dab5d0e
1 Parent(s): 13fe959

Added simple demo

Browse files
Files changed (2) hide show
  1. app.py +38 -0
  2. requirements.txt +5 -0
app.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from huggingface_hub import hf_hub_url, cached_download
3
+
4
+
5
+ def load_model():
6
+ REPO_ID = "MalchuL/JJBAGAN"
7
+ FILENAME = "198_jjba_8_k_2_099_ep.onnx"
8
+
9
+ global model
10
+
11
+ model = cached_download(
12
+ hf_hub_url(REPO_ID, FILENAME)
13
+ )
14
+
15
+ return model
16
+
17
+ def inference(img):
18
+
19
+ return img
20
+
21
+
22
+ title = "JJStyleTransfer"
23
+ description = "Gradio Demo for JoJo Bizzare Adventures 5 season style transfer. To use it, simply upload your image, or click one of the examples to load them."
24
+ article = "Github Repo Pytorch "
25
+ examples = [['demo/karin.jpg'],
26
+ ['demo/tucker.png'],
27
+ ['demo/biden.jpg']]
28
+
29
+ demo = gr.Interface(
30
+ fn=inference,
31
+ inputs=[gr.inputs.Image(type="pil")],
32
+ outputs=gr.outputs.Image(type="pil"),
33
+ title=title,
34
+ description=description,
35
+ article=article,
36
+ examples=examples)
37
+
38
+ demo.launch()
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ joblib
2
+ huggingface_hub
3
+ onnxruntime
4
+ numpy
5
+ gradio