Diangle commited on
Commit
01e6b5b
1 Parent(s): 839f53f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -25,9 +25,9 @@ HTML="""
25
  .text {
26
  font-size: 20px;
27
  padding-top: 15%;
28
- padding-left: 20px;
29
  padding-bottom: 5%;
30
- float: left;
31
  }
32
  </style>
33
  <body>
@@ -36,14 +36,19 @@ HTML="""
36
  <img src="https://huggingface.co/spaces/Diangle/Clip4Clip-webvid/resolve/main/Searchium.png" width="333" height="216">
37
  </div>
38
  <div class="text">
39
- <h1 style="font-size: 32px;"> Large Scale Video Search </h1>
40
  </div>
41
  </div>
42
  </body>
43
  </html>
44
  """
45
 
46
- DESCRIPTION="""This is a video retrieval demo using [Diangle/clip4clip-webvid](https://huggingface.co/Diangle/clip4clip-webvid)."""
 
 
 
 
 
47
 
48
 
49
  DATA_PATH = './data'
@@ -135,11 +140,10 @@ def search(search_sentence):
135
  with gr.Blocks() as demo:
136
  gr.HTML(HTML)
137
  gr.Markdown(DESCRIPTION)
138
- gr.Markdown("Retrieval of top 5 videos relevant to the input sentence: ")
139
  with gr.Row():
140
  with gr.Column():
141
  inp = gr.Textbox(placeholder="Write a sentence.")
142
- btn = gr.Button(value="Retrieve")
143
  ex = [["mind-blowing magic tricks"],["baking chocolate cake"],
144
  ["birds fly in the sky"], ["natural wonders of the world"]]
145
  gr.Examples(examples=ex,
@@ -147,6 +151,7 @@ with gr.Blocks() as demo:
147
  )
148
  with gr.Column():
149
  out = [gr.HTML() for _ in range(5)]
150
- btn.click(search, inputs=inp, outputs=out)
 
151
 
152
  demo.launch()
 
25
  .text {
26
  font-size: 20px;
27
  padding-top: 15%;
28
+ padding-left: 20%;
29
  padding-bottom: 5%;
30
+ float: left
31
  }
32
  </style>
33
  <body>
 
36
  <img src="https://huggingface.co/spaces/Diangle/Clip4Clip-webvid/resolve/main/Searchium.png" width="333" height="216">
37
  </div>
38
  <div class="text">
39
+ <h1 style="font-size: 20px;"> Large Scale Video Search </h1>
40
  </div>
41
  </div>
42
  </body>
43
  </html>
44
  """
45
 
46
+ DESCRIPTION="""Welcome to our video retrieval demo powered by [Diangle/clip4clip-webvid](https://huggingface.co/Diangle/clip4clip-webvid)!
47
+ Using a simple sentence you will find the top 5 most relevant videos among a dataset of 1.5 million videos.
48
+ Discover, explore, and enjoy the world of videos at your fingertips.
49
+ """
50
+ ENDING = """For search acceleration capabilities, please refer to [Searchium.ai](https://www.searchium.ai)
51
+ """
52
 
53
 
54
  DATA_PATH = './data'
 
140
  with gr.Blocks() as demo:
141
  gr.HTML(HTML)
142
  gr.Markdown(DESCRIPTION)
 
143
  with gr.Row():
144
  with gr.Column():
145
  inp = gr.Textbox(placeholder="Write a sentence.")
146
+ btn = gr.Button(value="Search")
147
  ex = [["mind-blowing magic tricks"],["baking chocolate cake"],
148
  ["birds fly in the sky"], ["natural wonders of the world"]]
149
  gr.Examples(examples=ex,
 
151
  )
152
  with gr.Column():
153
  out = [gr.HTML() for _ in range(5)]
154
+ btn.click(search, inputs=inp, outputs=out)
155
+ gr.Markdown(DESCRIPTION)
156
 
157
  demo.launch()