Spaces:
Runtime error
Runtime error
Rename 01_📼_Upload_Video_File.py to 01_Upload_Video_File.py
Browse files
01_📼_Upload_Video_File.py → 01_Upload_Video_File.py
RENAMED
@@ -2,6 +2,8 @@ import os
|
|
2 |
import tempfile
|
3 |
import time
|
4 |
|
|
|
|
|
5 |
import cv2
|
6 |
import moviepy.editor as mp
|
7 |
import numpy as np
|
@@ -12,23 +14,17 @@ from tqdm import tqdm
|
|
12 |
from models.deep_colorization.colorizers import eccv16
|
13 |
from utils import load_lottieurl, format_time, colorize_frame, change_model
|
14 |
|
15 |
-
st.
|
16 |
-
|
17 |
-
loaded_model = eccv16(pretrained=True).eval()
|
18 |
-
current_model = "None"
|
19 |
-
|
20 |
-
col1, col2 = st.columns([1, 3])
|
21 |
-
with col1:
|
22 |
-
lottie = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_RHdEuzVfEL.json")
|
23 |
-
st_lottie(lottie)
|
24 |
|
25 |
-
|
26 |
-
st.write("""
|
27 |
-
## B&W Videos Colorizer
|
28 |
##### Upload a black and white video and get a colorized version of it.
|
29 |
###### ➠ This space is using CPU Basic so it might take a while to colorize a video.
|
30 |
###### ➠ If you want more models and GPU available please support this space by donating.""")
|
31 |
|
|
|
|
|
|
|
|
|
32 |
|
33 |
def main():
|
34 |
model = st.selectbox(
|
@@ -133,9 +129,3 @@ def main():
|
|
133 |
|
134 |
if __name__ == "__main__":
|
135 |
main()
|
136 |
-
st.markdown(
|
137 |
-
"###### Made with :heart: by [Clément Delteil](https://www.linkedin.com/in/clementdelteil/) [](https://www.buymeacoffee.com/clementdelteil)")
|
139 |
-
st.markdown(
|
140 |
-
"###### [Blog post of the project](https://medium.com/geekculture/creating-a-web-app-to-colorize-images-and-youtube-videos-80f5be2d0f68)"
|
141 |
-
)
|
|
|
2 |
import tempfile
|
3 |
import time
|
4 |
|
5 |
+
os.environ["IMAGEIO_FFMPEG_EXE"] = "/usr/bin/ffmpeg"
|
6 |
+
|
7 |
import cv2
|
8 |
import moviepy.editor as mp
|
9 |
import numpy as np
|
|
|
14 |
from models.deep_colorization.colorizers import eccv16
|
15 |
from utils import load_lottieurl, format_time, colorize_frame, change_model
|
16 |
|
17 |
+
st.title("B&W Videos Colorizer")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
+
st.write("""
|
|
|
|
|
20 |
##### Upload a black and white video and get a colorized version of it.
|
21 |
###### ➠ This space is using CPU Basic so it might take a while to colorize a video.
|
22 |
###### ➠ If you want more models and GPU available please support this space by donating.""")
|
23 |
|
24 |
+
#st.set_page_config(page_title="Image & Video Colorizer", page_icon="🎨", layout="wide")
|
25 |
+
|
26 |
+
loaded_model = eccv16(pretrained=True).eval()
|
27 |
+
current_model = "None"
|
28 |
|
29 |
def main():
|
30 |
model = st.selectbox(
|
|
|
129 |
|
130 |
if __name__ == "__main__":
|
131 |
main()
|
|
|
|
|
|
|
|
|
|
|
|