|
import streamlit as st |
|
import os |
|
from PIL import Image |
|
|
|
|
|
|
|
def fetch_wikipedia_summary(keyword): |
|
|
|
return f"Summary about {keyword} from Wikipedia." |
|
|
|
|
|
def display_images_and_wikipedia_summaries(): |
|
st.title('Gallery with Related Stories') |
|
|
|
|
|
image_files = [f for f in os.listdir('.') if f.endswith('.png')] |
|
|
|
|
|
if not image_files: |
|
st.write("No PNG images found in the current directory.") |
|
return |
|
|
|
|
|
for image_file in image_files: |
|
|
|
image = Image.open(image_file) |
|
st.image(image, caption=image_file, use_column_width='always') |
|
|
|
|
|
|
|
keyword = image_file.split('.')[0] |
|
|
|
|
|
wikipedia_summary = fetch_wikipedia_summary(keyword) |
|
st.write(wikipedia_summary) |
|
|
|
|
|
display_images_and_wikipedia_summaries() |
|
|
|
|
|
|
|
import streamlit as st |
|
st.markdown('# Three Dragons 🐉🌍 Mythical Dragons Around the World by Aaron Wacker') |
|
|
|
dragons = { |
|
'#Fafnir #Norse': '- **Story**: Fafnir originally a dwarf, transformed into a fierce dragon due to his greed for the treasure he guarded. He was later slain by the hero Sigurd. - **Significance**: deadly sin of greed and the corrupting power of wealth.', |
|
'#Quetzalcoatl #Aztec': '- **Story**: Quetzalcoatl, the Feathered Serpent, is not a dragon in the traditional sense but shares many similarities. He was a deity representing wind, air, and learning. - **Significance**: creator god and a symbol of death and rebirth.', |
|
'#Tiamat #Mesopotamian': '- **Story**: Tiamat, primordial goddess of ocean, turned into a dragon-like creature in a battle against her children who threatened her authority. - **Significance**: chaos of primordial creation and is often associated with the forces of nature.' |
|
} |
|
|
|
for dragon, story in dragons.items(): |
|
st.subheader(dragon) |
|
st.markdown(f"- {story}") |
|
|
|
|
|
st.markdown(''' |
|
|
|
|
|
 |
|
|
|
|
|
 |
|
|
|
|
|
 |
|
|
|
|
|
 |
|
|
|
|
|
 |
|
|
|
''') |