Ahsen Khaliq commited on
Commit
a0f867c
1 Parent(s): 546a9ba

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import model as st_model
2
+ import gradio as gr
3
+
4
+ model = st_model.summarizer()
5
+
6
+ def inference(text):
7
+ documents = [text]
8
+ model.summarize(documents)
9
+ return model.summarize(documents)[0]
10
+
11
+ title = "Anime2Sketch"
12
+ description = "demo for Anime2Sketch. To use it, simply upload your image, or click one of the examples to load them. Read more at the links below."
13
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2104.05703'>Adversarial Open Domain Adaption for Sketch-to-Photo Synthesis</a> | <a href='https://github.com/Mukosame/Anime2Sketch'>Github Repo</a></p>"
14
+
15
+ gr.Interface(
16
+ inference,
17
+ [gr.inputs.Textbox(label="Input")],
18
+ gr.outputs.Textbox(label="Output"),
19
+ title=title,
20
+ description=description,
21
+ article=article
22
+ ).launch(debug=True)