Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -7,9 +7,40 @@ import faiss
|
|
7 |
import torch
|
8 |
from transformers import CLIPTokenizer, CLIPTextModelWithProjection
|
9 |
|
10 |
-
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
DESCRIPTION="""This is a video retrieval demo using [Diangle/clip4clip-webvid](https://huggingface.co/Diangle/clip4clip-webvid)."""
|
15 |
|
@@ -106,8 +137,7 @@ def search(search_sentence):
|
|
106 |
|
107 |
|
108 |
with gr.Blocks() as demo:
|
109 |
-
gr.HTML(
|
110 |
-
gr.HTML(TITLE)
|
111 |
gr.Markdown(DESCRIPTION)
|
112 |
gr.Markdown("Retrieval of top 5 videos relevant to the input sentence: ")
|
113 |
with gr.Row():
|
|
|
7 |
import torch
|
8 |
from transformers import CLIPTokenizer, CLIPTextModelWithProjection
|
9 |
|
10 |
+
HTML="""
|
11 |
+
<!DOCTYPE html>
|
12 |
+
<html>
|
13 |
+
<style>
|
14 |
+
.container {
|
15 |
+
align-items: center;
|
16 |
+
justify-content: center;
|
17 |
+
}
|
18 |
+
|
19 |
+
img {
|
20 |
+
max-width: 10%;
|
21 |
+
max-height:10%;
|
22 |
+
float: left;
|
23 |
+
}
|
24 |
+
|
25 |
+
.text {
|
26 |
+
font-size: 20px;
|
27 |
+
padding-top: 12%;
|
28 |
+
padding-left: 20px;
|
29 |
+
float: left;
|
30 |
+
}
|
31 |
+
</style>
|
32 |
+
<body>
|
33 |
+
<div class="container">
|
34 |
+
<div class="image">
|
35 |
+
<img src="https://huggingface.co/spaces/Diangle/Clip4Clip-webvid/resolve/main/Searchium.png" width="333" height="216">
|
36 |
+
</div>
|
37 |
+
<div class="text">
|
38 |
+
<h1 style="font-size: 64px;"> Video Retrieval </h1>
|
39 |
+
</div>
|
40 |
+
</div>
|
41 |
+
</body>
|
42 |
+
</html>
|
43 |
+
"""
|
44 |
|
45 |
DESCRIPTION="""This is a video retrieval demo using [Diangle/clip4clip-webvid](https://huggingface.co/Diangle/clip4clip-webvid)."""
|
46 |
|
|
|
137 |
|
138 |
|
139 |
with gr.Blocks() as demo:
|
140 |
+
gr.HTML(HTML)
|
|
|
141 |
gr.Markdown(DESCRIPTION)
|
142 |
gr.Markdown("Retrieval of top 5 videos relevant to the input sentence: ")
|
143 |
with gr.Row():
|