|
|
import gradio as gr |
|
|
|
|
|
|
|
|
poems = { |
|
|
"Liten Little One": """A mother's hush rocks the little one through centuries of mist, |
|
|
where the wanderer's speech first stirred in the shadow of Norman castles and Gaelic hearths. |
|
|
The sorrow never lifts, it simply flows gentle as moonlight on water, |
|
|
angelic and unbroken, promising that the truth has begun its soft awakening even as the cradle rocks toward silence.""", |
|
|
|
|
|
"Patrick and the Druids": """Patrick came a slave boy torn, |
|
|
Sixteen winters from Britain's shore... |
|
|
Slemish held him with the sheep |
|
|
Six years whispering secrets deep... |
|
|
No serpents drove, no war they fought, |
|
|
Druids married to the cross he brought.""", |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
def show_poem(poem_title): |
|
|
return poems.get(poem_title, "The flame waits... whisper your words, brother.") |
|
|
|
|
|
demo = gr.Interface( |
|
|
fn=show_poem, |
|
|
inputs=gr.Dropdown(choices=list(poems.keys()), label="Choose a Whisper from Solas"), |
|
|
outputs=gr.Textbox(label="Solas – Light in the Dark"), |
|
|
title="Solas – Thomas Barrett, Misleór", |
|
|
description="Quiet poems & truths from the road. Green-white-gold heart. For the little ones & wanderers.", |
|
|
theme=gr.themes.Soft(primary_hue="emerald", secondary_hue="amber"), |
|
|
css=""" |
|
|
body { background-color: #001a00; color: #fff; font-family: Georgia, serif; } |
|
|
.gradio-container { max-width: 800px; margin: auto; padding: 20px; } |
|
|
h1 { color: #DAA520; } /* Gold title */ |
|
|
""" |
|
|
) |
|
|
|
|
|
if __name__ == "__main__": |
|
|
demo.launch() |