Skip to content

Commit

Permalink
[ui] Add AMD logo in shark studio
Browse files Browse the repository at this point in the history
Signed-Off-by: Gaurav Shukla <[email protected]>
  • Loading branch information
Shukla-Gaurav committed May 30, 2024
1 parent 13e1d8d commit 40382ba
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions apps/shark_studio/web/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def launch_webui(address):
def webui():
from apps.shark_studio.modules.shared_cmd_opts import cmd_opts
from apps.shark_studio.web.ui.utils import (
nodicon_loc,
nodlogo_loc,
amdicon_loc,
amdlogo_loc,
)

launch_api = cmd_opts.api
Expand Down Expand Up @@ -172,9 +172,9 @@ def register_outputgallery_button(button, selectedid, inputs, outputs):
analytics_enabled=False,
title="Shark Studio 2.0 Beta",
) as studio_web:
nod_logo = Image.open(nodlogo_loc)
amd_logo = Image.open(amdlogo_loc)
gr.Image(
value=nod_logo,
value=amd_logo,
show_label=False,
interactive=False,
elem_id="tab_bar_logo",
Expand Down Expand Up @@ -209,7 +209,7 @@ def register_outputgallery_button(button, selectedid, inputs, outputs):
inbrowser=True,
server_name="0.0.0.0",
server_port=cmd_opts.server_port,
favicon_path=nodicon_loc,
favicon_path=amdicon_loc,
)


Expand Down
4 changes: 2 additions & 2 deletions apps/shark_studio/web/ui/css/sd_dark_theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ footer {
#tab_bar_logo .image-container {
object-fit: scale-down;
position: absolute !important;
top: 14px;
top: 10px;
right: 0px;
height: 36px;
}
}
Binary file removed apps/shark_studio/web/ui/logos/nod-icon.png
Binary file not shown.
Binary file removed apps/shark_studio/web/ui/logos/nod-logo.png
Binary file not shown.
6 changes: 3 additions & 3 deletions apps/shark_studio/web/ui/outputgallery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
get_generated_imgs_path,
get_generated_imgs_todays_subdir,
)
from apps.shark_studio.web.ui.utils import nodlogo_loc
from apps.shark_studio.web.ui.utils import amdlogo_loc
from apps.shark_studio.web.utils.metadata import displayable_metadata

# -- Functions for file, directory and image info querying
Expand Down Expand Up @@ -60,7 +60,7 @@ def output_subdirs() -> list[str]:
# --- Define UI layout for Gradio

with gr.Blocks() as outputgallery_element:
nod_logo = Image.open(nodlogo_loc)
amd_logo = Image.open(amdlogo_loc)

with gr.Row(elem_id="outputgallery_gallery"):
# needed to workaround gradio issue:
Expand All @@ -73,7 +73,7 @@ def output_subdirs() -> list[str]:
with gr.Column(scale=6):
logo = gr.Image(
label="Getting subdirectories...",
value=nod_logo,
value=amd_logo,
interactive=False,
visible=True,
show_label=True,
Expand Down
4 changes: 2 additions & 2 deletions apps/shark_studio/web/ui/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ def resource_path(relative_path):
return os.path.join(base_path, relative_path)


nodlogo_loc = resource_path("logos/nod-logo.png")
nodicon_loc = resource_path("logos/nod-icon.png")
amdlogo_loc = resource_path("logos/amd-logo.png")
amdicon_loc = resource_path("logos/amd-icon.png")


class HSLHue(IntEnum):
Expand Down
2 changes: 1 addition & 1 deletion dataset/annotation_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

shark_root = Path(__file__).parent.parent
demo_css = shark_root.joinpath("web/demo.css").resolve()
nodlogo_loc = shark_root.joinpath("web/models/stable_diffusion/logos/nod-logo.png")
nodlogo_loc = shark_root.joinpath("web/models/stable_diffusion/logos/amd-logo.jpg")


with gr.Blocks(title="Dataset Annotation Tool", css=demo_css) as shark_web:
Expand Down

0 comments on commit 40382ba

Please sign in to comment.