Skip to content
This repository has been archived by the owner on Dec 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #70 from banodoco/green-head
Browse files Browse the repository at this point in the history
Green head
  • Loading branch information
peteromallet authored Feb 3, 2024
2 parents 4e3610f + 21f3d9c commit fe19024
Show file tree
Hide file tree
Showing 19 changed files with 925 additions and 560 deletions.
Binary file added sample_assets/sample_images/main.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 36 additions & 25 deletions ui_components/components/adjust_shot_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,56 @@
from ui_components.widgets.shot_view import shot_keyframe_element
from ui_components.components.explorer_page import gallery_image_view
from ui_components.components.explorer_page import generate_images_element
from ui_components.components.frame_styling_page import frame_styling_page
from ui_components.widgets.frame_selector import frame_selector_widget, frame_view
from utils import st_memory
from utils.data_repo.data_repo import DataRepo



def adjust_shot_page(shot_uuid: str, h2):

with st.sidebar:

frame_selection = frame_selector_widget(show_frame_selector=True)

data_repo = DataRepo()
shot = data_repo.get_shot_from_uuid(shot_uuid)

with h2:
frame_selector_widget(show=['shot_selector'])
if frame_selection == "":

st.markdown(f"#### :red[{st.session_state['main_view_type']}] > :green[{st.session_state['page']}] > :orange[{shot.name}]")
with st.sidebar:
frame_view(view='Video')
with st.expander("📋 Explorer Shortlist",expanded=True):

st.markdown("***")
if st_memory.toggle("Open", value=True, key="explorer_shortlist_toggle"):

project_setting = data_repo.get_project_setting(shot.project.uuid)
number_of_pages = project_setting.total_shortlist_gallery_pages
# page_number = st.radio("Select page:", options=range(1, project_setting.total_shortlist_gallery_pages + 1), horizontal=True,key=f"main_page_number")
# st.markdown("***")
page_number = 0
gallery_image_view(shot.project.uuid, shortlist=True,view=['add_and_remove_from_shortlist','add_to_this_shot'], shot=shot,sidebar=True)

with st.sidebar:
frame_view(view='Video')

shot_keyframe_element(st.session_state["shot_uuid"], 4, position="Individual")
# with st.expander("📋 Explorer Shortlist",expanded=True):
shot_explorer_view = st_memory.menu('',["Shortlist", "Explore"],
icons=['grid-3x3','airplane'],
menu_icon="cast",
default_index=st.session_state.get('shot_explorer_view', 0),
key="shot_explorer_view", orientation="horizontal",
styles={"nav-link": {"font-size": "15px", "margin": "0px", "--hover-color": "#eee"}, "nav-link-selected": {"background-color": "#868c91"}})

st.markdown("***")




st.markdown(f"#### :red[{st.session_state['main_view_type']}] > :green[{st.session_state['page']}] > :orange[{shot.name}]")

if shot_explorer_view == "Shortlist":
project_setting = data_repo.get_project_setting(shot.project.uuid)
page_number = st.radio("Select page:", options=range(1, project_setting.total_shortlist_gallery_pages + 1), horizontal=True)
st.markdown("***")
gallery_image_view(shot.project.uuid, page_number=page_number, num_items_per_page=8, open_detailed_view_for_all=False, shortlist=True, num_columns=4,view="individual_shot", shot=shot)
elif shot_explorer_view == "Explore":


shot_keyframe_element(st.session_state["shot_uuid"], 4, position="Individual")

project_setting = data_repo.get_project_setting(shot.project.uuid)
page_number = st.radio("Select page:", options=range(1, project_setting.total_shortlist_gallery_pages + 1), horizontal=True)
generate_images_element(position='explorer', project_uuid=shot.project.uuid, timing_uuid=st.session_state['current_frame_uuid'])
# st.markdown("***")

with st.expander("✨ Generate Images", expanded=True):
generate_images_element(position='explorer', project_uuid=shot.project.uuid, timing_uuid=st.session_state['current_frame_uuid'])
st.markdown("***")
page_number = st.radio("Select page:", options=range(1, project_setting.total_shortlist_gallery_pages + 1), horizontal=True,key=f"main_page_number_{shot.project.uuid}")
st.markdown("***")
gallery_image_view(shot.project.uuid, page_number=page_number, num_items_per_page=8, open_detailed_view_for_all=False, shortlist=False, num_columns=4,view="individual_shot", shot=shot)
gallery_image_view(shot.project.uuid, shortlist=False,view=['add_and_remove_from_shortlist','add_to_this_shot'], shot=shot)
else:
frame_styling_page(st.session_state["shot_uuid"], h2)
9 changes: 5 additions & 4 deletions ui_components/components/animate_shot_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ def animate_shot_page(shot_uuid: str, h2):
data_repo = DataRepo()
shot = data_repo.get_shot_from_uuid(shot_uuid)

with h2:
frame_selector_widget(show=['shot_selector'])


with st.sidebar:
frame_view()
frame_selector_widget(show_frame_selector=False)
frame_view(view='Video')

st.markdown(f"#### :red[{st.session_state['main_view_type']}] > :green[{st.session_state['page']}] > :orange[{shot.name}]")
st.markdown("***")
variant_comparison_grid(st.session_state['shot_uuid'], stage="Shots")
with st.expander("🎬 Choose Animation Style & Create Variants", expanded=True):
with st.expander("🎥 Generate Animation", expanded=True):
animation_style_element(st.session_state['shot_uuid'])
5 changes: 4 additions & 1 deletion ui_components/components/app_settings_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import webbrowser
from shared.constants import SERVER, ServerType
from utils.common_utils import get_current_user
from ui_components.components.query_logger_page import query_logger_page

from utils.data_repo.data_repo import DataRepo

Expand Down Expand Up @@ -37,4 +38,6 @@ def app_settings_page():
else:
payment_link = data_repo.generate_payment_link(credits)
payment_link = f"""<a target='_self' href='{payment_link}'> PAYMENT LINK </a>"""
st.markdown(payment_link, unsafe_allow_html=True)
st.markdown(payment_link, unsafe_allow_html=True)
st.markdown("***")
query_logger_page()
Loading

0 comments on commit fe19024

Please sign in to comment.