Commit
·
1aceee0
1
Parent(s):
23e5406
add landing page html
Browse files- main.py +5 -1
- static/landing_page.html +119 -0
- static/submit_video.html +1 -1
main.py
CHANGED
@@ -31,7 +31,11 @@ logging.basicConfig(filename='main.log',
|
|
31 |
|
32 |
@app.get("/")
|
33 |
async def root():
|
34 |
-
|
|
|
|
|
|
|
|
|
35 |
|
36 |
@app.get("/submit_video/")
|
37 |
async def get_form():
|
|
|
31 |
|
32 |
@app.get("/")
|
33 |
async def root():
|
34 |
+
html_content = f"""
|
35 |
+
{read_html(os.path.join(os.getcwd(),"static/landing_page.html"))}
|
36 |
+
"""
|
37 |
+
return HTMLResponse(content=html_content)
|
38 |
+
|
39 |
|
40 |
@app.get("/submit_video/")
|
41 |
async def get_form():
|
static/landing_page.html
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<style>
|
5 |
+
/* CSS Styles */
|
6 |
+
body {
|
7 |
+
font-family: 'Arial', sans-serif;
|
8 |
+
background-color: #f0f0f0;
|
9 |
+
color: #333;
|
10 |
+
line-height: 1.6;
|
11 |
+
text-align: center;
|
12 |
+
padding-top: 50px;
|
13 |
+
margin: 0;
|
14 |
+
height: 100vh;
|
15 |
+
display: flex;
|
16 |
+
align-items: center;
|
17 |
+
justify-content: center;
|
18 |
+
position: relative;
|
19 |
+
}
|
20 |
+
|
21 |
+
.container {
|
22 |
+
width: 90%;
|
23 |
+
max-width: 1000px; /* Increased max width */
|
24 |
+
margin: auto;
|
25 |
+
padding: 40px; /* Increased padding for more space */
|
26 |
+
background: #ffffff;
|
27 |
+
border-radius: 8px;
|
28 |
+
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); /* Enhanced shadowing */
|
29 |
+
transform: translateY(-35%);
|
30 |
+
}
|
31 |
+
|
32 |
+
h1 {
|
33 |
+
color: #333;
|
34 |
+
margin-bottom: 20px;
|
35 |
+
}
|
36 |
+
|
37 |
+
p {
|
38 |
+
font-size: 18px;
|
39 |
+
color: #666;
|
40 |
+
margin-bottom: 30px;
|
41 |
+
}
|
42 |
+
|
43 |
+
.button {
|
44 |
+
display: inline-block;
|
45 |
+
padding: 15px 30px; /* Increased padding for larger buttons */
|
46 |
+
margin: 10px;
|
47 |
+
border-radius: 4px; /* Slightly more rounded corners */
|
48 |
+
color: white;
|
49 |
+
background-color: #4CAF50;
|
50 |
+
text-decoration: none;
|
51 |
+
font-size: 18px;
|
52 |
+
transition: background-color 0.3s, box-shadow 0.3s;
|
53 |
+
}
|
54 |
+
|
55 |
+
.button:hover {
|
56 |
+
background-color: #45a049;
|
57 |
+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); /* Subtle hover effect */
|
58 |
+
}
|
59 |
+
|
60 |
+
.button.docs {
|
61 |
+
background-color: #008CBA;
|
62 |
+
}
|
63 |
+
|
64 |
+
.button.docs:hover {
|
65 |
+
background-color: #007BAA;
|
66 |
+
}
|
67 |
+
/* Responsiveness */
|
68 |
+
@media (max-width: 768px) {
|
69 |
+
.container {
|
70 |
+
width: 95%;
|
71 |
+
padding: 20px;
|
72 |
+
display: flex; /* Added to create a flex container */
|
73 |
+
flex-direction: column; /* Stack elements vertically */
|
74 |
+
align-items: center; /* Center-align items for a neat look */
|
75 |
+
}
|
76 |
+
|
77 |
+
h1 {
|
78 |
+
font-size: 24px;
|
79 |
+
}
|
80 |
+
|
81 |
+
p {
|
82 |
+
font-size: 16px;
|
83 |
+
text-align: center; /* Center text for a balanced appearance */
|
84 |
+
}
|
85 |
+
|
86 |
+
.button {
|
87 |
+
width: 80%; /* Set a specific width for both buttons */
|
88 |
+
padding: 10px 20px;
|
89 |
+
font-size: 16px;
|
90 |
+
margin-bottom: 10px; /* Add some space between the buttons */
|
91 |
+
}
|
92 |
+
|
93 |
+
/* Ensure buttons are the same size */
|
94 |
+
.button.submit, .button.docs {
|
95 |
+
width: calc(80% - 20px); /* Adjusting width to account for padding */
|
96 |
+
}
|
97 |
+
}
|
98 |
+
|
99 |
+
@media (max-height: 500px) {
|
100 |
+
body {
|
101 |
+
padding-top: 20px;
|
102 |
+
height: auto;
|
103 |
+
}
|
104 |
+
|
105 |
+
.container {
|
106 |
+
align-items: center; /* Ensure center alignment in constrained height */
|
107 |
+
}
|
108 |
+
}
|
109 |
+
</style>
|
110 |
+
</head>
|
111 |
+
<body>
|
112 |
+
<div class="container">
|
113 |
+
<h1>Multilang-ASR-Captioner</h1>
|
114 |
+
<p>A multilingual automatic speech recognition and video captioning CLI tool using faster whisper on cpu.</p>
|
115 |
+
<a href="/submit_video" class="button submit">Submit Video</a>
|
116 |
+
<a href="/docs" class="button docs">Documentation</a>
|
117 |
+
</div>
|
118 |
+
</body>
|
119 |
+
</html>
|
static/submit_video.html
CHANGED
@@ -36,7 +36,7 @@
|
|
36 |
color: white;
|
37 |
padding: 15px 20px;
|
38 |
border: none;
|
39 |
-
border-radius:
|
40 |
cursor: pointer;
|
41 |
font-size: 18px;
|
42 |
}
|
|
|
36 |
color: white;
|
37 |
padding: 15px 20px;
|
38 |
border: none;
|
39 |
+
border-radius: 5px;
|
40 |
cursor: pointer;
|
41 |
font-size: 18px;
|
42 |
}
|