zzl commited on
Commit
cd77bb2
·
1 Parent(s): 95f618d

[Misc] more desc.

Browse files
Files changed (2) hide show
  1. app.py +25 -2
  2. demo_vid.py +2 -2
app.py CHANGED
@@ -1,7 +1,9 @@
1
- import torch
2
  import gradio as gr
3
  from demo_img import demo_img
4
  from demo_vid import demo_vid
 
 
5
  with gr.Blocks(css='style.css') as demo:
6
  gr.HTML(
7
  """
@@ -23,13 +25,34 @@ with gr.Blocks(css='style.css') as demo:
23
  <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
24
  [<a href="https://arxiv.org/abs/2303.13439" style="color:blue;">arXiv</a>]
25
  [<a href="https://github.com/MCG-NKU/AMT" style="color:blue;">GitHub</a>]
 
 
26
  </h2>
 
 
 
 
 
 
27
  </div>
28
- """)
 
 
29
 
30
  with gr.Tab('Img2Vid'):
31
  demo_img()
32
  with gr.Tab('VFI'):
33
  demo_vid()
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  demo.launch(debug=False)
 
1
+ import os
2
  import gradio as gr
3
  from demo_img import demo_img
4
  from demo_vid import demo_vid
5
+
6
+ SPACE_ID = os.getenv('SPACE_ID')
7
  with gr.Blocks(css='style.css') as demo:
8
  gr.HTML(
9
  """
 
25
  <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
26
  [<a href="https://arxiv.org/abs/2303.13439" style="color:blue;">arXiv</a>]
27
  [<a href="https://github.com/MCG-NKU/AMT" style="color:blue;">GitHub</a>]
28
+ [<a href="https://github.com/MCG-NKU/AMT" style="color:blue;">Colab</a>]
29
+ [<a href="https://github.com/MCG-NKU/AMT" style="color:blue;">Replicate</a>]
30
  </h2>
31
+ <p>For faster inference without waiting in queue, you may duplicate the space and upgrade to GPU in settings.
32
+ """ +
33
+ f'<a href="https://huggingface.co/spaces/{SPACE_ID}?duplicate=true">'
34
+ """ +
35
+ <img style="display: inline; margin-top: 0em; margin-bottom: 0em" src="https://bit.ly/3gLdBN6" alt="Duplicate Space" /></a>
36
+ </p>
37
  </div>
38
+ """
39
+
40
+ )
41
 
42
  with gr.Tab('Img2Vid'):
43
  demo_img()
44
  with gr.Tab('VFI'):
45
  demo_vid()
46
+
47
+ gr.HTML(
48
+ """
49
+ <div style="text-align: center; max-width: 1200px; margin: 20px auto;">
50
+ <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
51
+ Licensed under the Creative Commons Attribution-NonCommercial 4.0 International for Non-commercial use only.
52
+ Any commercial use should get a formal permission first.
53
+ </h2>
54
+ </div>
55
+ """
56
+ )
57
 
58
  demo.launch(debug=False)
demo_vid.py CHANGED
@@ -65,13 +65,13 @@ def vid2vid(model_type, video, iters):
65
  def demo_vid():
66
  with gr.Blocks() as demo:
67
  with gr.Row():
68
- gr.Markdown('## Image Demo')
69
  with gr.Row():
70
  gr.HTML(
71
  """
72
  <div style="text-align: left; auto;">
73
  <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
74
- Description: With 2 input images, you can generate a short video from them.
75
  </h3>
76
  </div>
77
  """)
 
65
  def demo_vid():
66
  with gr.Blocks() as demo:
67
  with gr.Row():
68
+ gr.Markdown('## Video Demo')
69
  with gr.Row():
70
  gr.HTML(
71
  """
72
  <div style="text-align: left; auto;">
73
  <h2 style="font-weight: 450; font-size: 1rem; margin: 0rem">
74
+ Description: You can increase the frame rate of the video by 2 times, 4 times, or 8 times. (The video should be less than 10 seconds.)
75
  </h3>
76
  </div>
77
  """)