Skip to content

Commit

Permalink
Theme change
Browse files Browse the repository at this point in the history
  • Loading branch information
rmusser01 committed May 10, 2024
1 parent 578de54 commit 4ca3270
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
22 changes: 19 additions & 3 deletions Tests/HF/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
# 2. Usage of/Hardcoding HF_TOKEN as token for API calls
# 3. Usage of HuggingFace for Inference
# 4. Other stuff I can't remember. Will eventually do a diff and document them.
#
# 5. Dark mode changes under gradio
#



Expand Down Expand Up @@ -1200,7 +1201,22 @@ def process_transcription(json_data):
return "\n".join([item["text"] for item in json_data])
else:
return ""

with gr.Blocks(theme='bethecloud/storj_theme') as demo:
with gr.Column(scale=3):
with gr.Box():
dropdown.render()
toggle_dark = gr.Button(value="Toggle Dark").style(full_width=True)
dropdown.change(None, dropdown, None, _js=js)
toggle_dark.click(
None,
_js="""
() => {
document.body.classList.toggle('dark');
document.querySelector('gradio-app').style.backgroundColor = 'var(--color-background-primary)'
}
""",
)

inputs = [
gr.components.Textbox(label="URL"),
gr.components.Number(value=2, label="Number of Speakers"),
Expand Down Expand Up @@ -1228,7 +1244,7 @@ def process_transcription(json_data):
title="Video Transcription and Summarization",
description="Submit a video URL for transcription and summarization.",
allow_flagging="never",
theme='freddyaboulton/dracula_revamped'
theme='bethecloud/storj_theme'
)

iface.launch(share=True)
Expand Down
2 changes: 1 addition & 1 deletion summarize.py
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ def process_transcription(json_data):
title="Video Transcription and Summarization",
description="Submit a video URL for transcription and summarization.",
allow_flagging="never",
theme='freddyaboulton/dracula_revamped'
theme='bethecloud/storj_theme'
)

iface.launch(share=True)
Expand Down

0 comments on commit 4ca3270

Please sign in to comment.