Commit
·
c5829e8
1
Parent(s):
97fddf5
improvements in the html and css
Browse files- main.py +2 -2
- static/landing_page.html +1 -2
- static/submit_video.html +11 -9
main.py
CHANGED
|
@@ -114,12 +114,12 @@ async def process_video_api(video_file: MP4Video = Depends(),
|
|
| 114 |
srt_file.file.close()
|
| 115 |
logging.info("Processing the video...")
|
| 116 |
output_path, _ = process_video(temp_input_path, SRT_PATH, max_words_per_line, fontsize, font, bg_color, text_color)
|
| 117 |
-
logging.info("
|
| 118 |
zip_path = zip_response(os.path.join(temp_vid_dir,"archive.zip"), [output_path, SRT_PATH])
|
| 119 |
return FileResponse(zip_path, media_type='application/zip', filename=f"result_{video_file.filename.split('.')[0]}.zip")
|
| 120 |
logging.info("Processing the video...")
|
| 121 |
output_path, srt_path = process_video(temp_input_path, None, max_words_per_line, fontsize, font, bg_color, text_color)
|
| 122 |
-
logging.info("
|
| 123 |
zip_path = zip_response(os.path.join(temp_vid_dir,"archive.zip"), [output_path, srt_path])
|
| 124 |
return FileResponse(zip_path, media_type='application/zip', filename=f"result_{video_file.filename.split('.')[0]}.zip")
|
| 125 |
|
|
|
|
| 114 |
srt_file.file.close()
|
| 115 |
logging.info("Processing the video...")
|
| 116 |
output_path, _ = process_video(temp_input_path, SRT_PATH, max_words_per_line, fontsize, font, bg_color, text_color)
|
| 117 |
+
logging.info("Zipping response...")
|
| 118 |
zip_path = zip_response(os.path.join(temp_vid_dir,"archive.zip"), [output_path, SRT_PATH])
|
| 119 |
return FileResponse(zip_path, media_type='application/zip', filename=f"result_{video_file.filename.split('.')[0]}.zip")
|
| 120 |
logging.info("Processing the video...")
|
| 121 |
output_path, srt_path = process_video(temp_input_path, None, max_words_per_line, fontsize, font, bg_color, text_color)
|
| 122 |
+
logging.info("Zipping response...")
|
| 123 |
zip_path = zip_response(os.path.join(temp_vid_dir,"archive.zip"), [output_path, srt_path])
|
| 124 |
return FileResponse(zip_path, media_type='application/zip', filename=f"result_{video_file.filename.split('.')[0]}.zip")
|
| 125 |
|
static/landing_page.html
CHANGED
|
@@ -76,8 +76,7 @@
|
|
| 76 |
}
|
| 77 |
|
| 78 |
.footer a {
|
| 79 |
-
|
| 80 |
-
padding: 5rem;
|
| 81 |
text-decoration: none;
|
| 82 |
}
|
| 83 |
.fa-github:hover {
|
|
|
|
| 76 |
}
|
| 77 |
|
| 78 |
.footer a {
|
| 79 |
+
padding: 0.5rem;
|
|
|
|
| 80 |
text-decoration: none;
|
| 81 |
}
|
| 82 |
.fa-github:hover {
|
static/submit_video.html
CHANGED
|
@@ -12,13 +12,13 @@
|
|
| 12 |
}
|
| 13 |
|
| 14 |
form {
|
| 15 |
-
max-width:
|
| 16 |
-
margin:
|
| 17 |
-
padding:
|
| 18 |
background: #ffffff;
|
| 19 |
border-radius: 8px;
|
| 20 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 21 |
-
padding-bottom:
|
| 22 |
}
|
| 23 |
|
| 24 |
input[type=file],
|
|
@@ -33,14 +33,17 @@
|
|
| 33 |
}
|
| 34 |
|
| 35 |
input[type=submit] {
|
| 36 |
-
width:
|
| 37 |
background-color: #4CAF50;
|
| 38 |
color: white;
|
| 39 |
padding: 15px 20px;
|
| 40 |
border: none;
|
| 41 |
border-radius: 5px;
|
| 42 |
cursor: pointer;
|
| 43 |
-
font-size:
|
|
|
|
|
|
|
|
|
|
| 44 |
}
|
| 45 |
|
| 46 |
input[type=submit]:hover {
|
|
@@ -61,8 +64,7 @@
|
|
| 61 |
}
|
| 62 |
|
| 63 |
.footer a {
|
| 64 |
-
|
| 65 |
-
padding: 5rem;
|
| 66 |
text-decoration: none;
|
| 67 |
}
|
| 68 |
|
|
@@ -96,7 +98,7 @@
|
|
| 96 |
Background color (Pro tip: #00FFFF00 = transparent): <input type="text" name="bg_color" value="#070a13b3"><br>
|
| 97 |
Text color: <input type="text" name="text_color" value="white"><br>
|
| 98 |
<input type="submit">
|
| 99 |
-
|
| 100 |
<!-- Footer -->
|
| 101 |
<div class="footer">
|
| 102 |
<p>Created by:</p>
|
|
|
|
| 12 |
}
|
| 13 |
|
| 14 |
form {
|
| 15 |
+
max-width: 400px;
|
| 16 |
+
margin: 10px auto;
|
| 17 |
+
padding: 5px;
|
| 18 |
background: #ffffff;
|
| 19 |
border-radius: 8px;
|
| 20 |
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
| 21 |
+
padding-bottom: 0.5rem;
|
| 22 |
}
|
| 23 |
|
| 24 |
input[type=file],
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
input[type=submit] {
|
| 36 |
+
width: 25%;
|
| 37 |
background-color: #4CAF50;
|
| 38 |
color: white;
|
| 39 |
padding: 15px 20px;
|
| 40 |
border: none;
|
| 41 |
border-radius: 5px;
|
| 42 |
cursor: pointer;
|
| 43 |
+
font-size: 14px;
|
| 44 |
+
display: block;
|
| 45 |
+
margin-right: auto;
|
| 46 |
+
margin-left: auto;
|
| 47 |
}
|
| 48 |
|
| 49 |
input[type=submit]:hover {
|
|
|
|
| 64 |
}
|
| 65 |
|
| 66 |
.footer a {
|
| 67 |
+
padding: 0.5rem;
|
|
|
|
| 68 |
text-decoration: none;
|
| 69 |
}
|
| 70 |
|
|
|
|
| 98 |
Background color (Pro tip: #00FFFF00 = transparent): <input type="text" name="bg_color" value="#070a13b3"><br>
|
| 99 |
Text color: <input type="text" name="text_color" value="white"><br>
|
| 100 |
<input type="submit">
|
| 101 |
+
</form>
|
| 102 |
<!-- Footer -->
|
| 103 |
<div class="footer">
|
| 104 |
<p>Created by:</p>
|