Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Add AMD logo in shark studio #2150

Merged
merged 1 commit into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 added apps/shark_studio/web/ui/logos/amd-icon.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added apps/shark_studio/web/ui/logos/amd-logo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.jpg")
amdicon_loc = resource_path("logos/amd-icon.jpg")


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
Loading