Wazzzabeee commited on
Commit
95b6b9e
β€’
1 Parent(s): 0c3fdc3

Update pages/02_πŸŽ₯_Input_Youtube_Link.py

Browse files
pages/02_πŸŽ₯_Input_Youtube_Link.py CHANGED
@@ -1,34 +1,16 @@
1
  import streamlit as st
2
  from streamlit_lottie import st_lottie
3
- from models.deep_colorization.colorizers import *
4
- import requests
5
-
6
- st.set_page_config(page_title="Image & Video Colorizer", page_icon="🎨", layout="wide")
7
 
 
 
8
 
9
- # Define a function that we can use to load lottie files from a link.
10
- def load_lottieurl(url: str):
11
- r = requests.get(url)
12
- if r.status_code != 200:
13
- return None
14
- return r.json()
15
 
16
 
17
  loaded_model = eccv16(pretrained=True).eval()
18
  current_model = "None"
19
 
20
 
21
- def change_model(current_model, model):
22
- if current_model != model:
23
- if model == "ECCV16":
24
- loaded_model = eccv16(pretrained=True).eval()
25
- elif model == "SIGGRAPH17":
26
- loaded_model = siggraph17(pretrained=True).eval()
27
- return loaded_model
28
- else:
29
- raise Exception("Model is the same as the current one.")
30
-
31
-
32
  col1, col2 = st.columns([1, 3])
33
  with col1:
34
  lottie = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_RHdEuzVfEL.json")
@@ -51,7 +33,7 @@ def main():
51
 
52
  link = st.text_input("YouTube Link (The longer the video, the longer the processing time)")
53
  if st.button("Colorize"):
54
- print("yo")
55
 
56
 
57
  if __name__ == "__main__":
 
1
  import streamlit as st
2
  from streamlit_lottie import st_lottie
 
 
 
 
3
 
4
+ from models.deep_colorization.colorizers import eccv16
5
+ from utils import load_lottieurl, change_model
6
 
7
+ st.set_page_config(page_title="Image & Video Colorizer", page_icon="🎨", layout="wide")
 
 
 
 
 
8
 
9
 
10
  loaded_model = eccv16(pretrained=True).eval()
11
  current_model = "None"
12
 
13
 
 
 
 
 
 
 
 
 
 
 
 
14
  col1, col2 = st.columns([1, 3])
15
  with col1:
16
  lottie = load_lottieurl("https://assets5.lottiefiles.com/packages/lf20_RHdEuzVfEL.json")
 
33
 
34
  link = st.text_input("YouTube Link (The longer the video, the longer the processing time)")
35
  if st.button("Colorize"):
36
+ st.info('This feature hasn\'t been implemented yet', icon="ℹ️")
37
 
38
 
39
  if __name__ == "__main__":