awacke1 commited on
Commit
8743176
โ€ข
1 Parent(s): 9ab2c29

Create backup1.app.py

Browse files
Files changed (1) hide show
  1. backup1.app.py +152 -0
backup1.app.py ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import os
3
+ from PIL import Image
4
+
5
+ # Placeholder function for Wikipedia content fetching
6
+ # You'll need to replace this with actual fetching logic
7
+ def fetch_wikipedia_summary(keyword):
8
+ # Placeholder text, replace with actual Wikipedia fetching logic
9
+ return f"Summary about {keyword} from Wikipedia."
10
+
11
+ # Display images from the current directory and fetch related Wikipedia stories
12
+ def display_images_and_wikipedia_summaries():
13
+ st.title('Gallery with Related Stories')
14
+
15
+ # Scan current directory for PNG images
16
+ image_files = [f for f in os.listdir('.') if f.endswith('.png')]
17
+
18
+ # Check if there are any PNG images
19
+ if not image_files:
20
+ st.write("No PNG images found in the current directory.")
21
+ return
22
+
23
+ # Iterate over found images
24
+ for image_file in image_files:
25
+ # Open and display each image
26
+ image = Image.open(image_file)
27
+ st.image(image, caption=image_file, use_column_width='always')
28
+
29
+ # Extract a keyword from the image file name for Wikipedia search
30
+ # This is a simple example; adjust logic as needed for more complex titles
31
+ keyword = image_file.split('.')[0] # Assumes keyword is the file name without extension
32
+
33
+ # Fetch and display related Wikipedia content
34
+ wikipedia_summary = fetch_wikipedia_summary(keyword)
35
+ st.write(wikipedia_summary)
36
+
37
+ # Call the function to display images and summaries
38
+ display_images_and_wikipedia_summaries()
39
+
40
+
41
+
42
+ import streamlit as st
43
+ st.markdown('# Three Dragons ๐Ÿ‰๐ŸŒ Mythical Dragons Around the World by Aaron Wacker')
44
+
45
+ dragons = {
46
+ '#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.',
47
+ '#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.',
48
+ '#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.'
49
+ }
50
+
51
+ for dragon, story in dragons.items():
52
+ st.subheader(dragon)
53
+ st.markdown(f"- {story}")
54
+
55
+
56
+ st.markdown('''
57
+ https://github.com/AaronCWacker/ThreeDragons
58
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/vkNh6XnEtGSj8mXea1W6p.png)
59
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/Kr_nqtaglHE_aiFxWH9zF.png)
60
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/WLRKWqB6dKlMH6saVV9cX.png)
61
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/Lyazf6FuX4nH__4illVki.png)
62
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/ZemsxlT3b5idB0W5IjL1o.png)
63
+ ''')
64
+
65
+
66
+
67
+ st.markdown('''
68
+ # Remixable!!
69
+ ## Classifications''')
70
+
71
+ # Create three columns for Inputs, Outputs, and Health
72
+ col1, col2, col3 = st.columns(3)
73
+
74
+ with col1:
75
+ st.markdown('''### Inputs''')
76
+ st.button("๐Ÿ“ Text")
77
+ st.button("๐Ÿ“– Read")
78
+ st.button("๐Ÿ“ท Photo")
79
+ st.button("๐Ÿ–ผ๏ธ View")
80
+ st.button("๐ŸŽ™๏ธ Record")
81
+ st.button("๐ŸŽง Listen")
82
+ st.button("๐ŸŽฅ Video")
83
+ st.button("๐Ÿ“น Capture")
84
+
85
+ with col2:
86
+ st.markdown('''### Outputs''')
87
+ st.button("๐Ÿ’ฌ Chat")
88
+ st.button("โœ๏ธ Write")
89
+ st.button("๐ŸŽจ Art")
90
+ st.button("๐ŸŒ„ Create")
91
+ st.button("๐ŸŽต Music")
92
+ st.button("๐ŸŽถ Compose")
93
+ st.button("๐Ÿ“ผ Watch")
94
+ st.button("๐Ÿฟ Movies")
95
+
96
+ with col3:
97
+ st.markdown('''### Health''')
98
+ st.button("๐Ÿ’‰ Vaccinate")
99
+ st.button("๐Ÿฉบ Diagnose")
100
+ st.button("๐Ÿฅ Hospital")
101
+ st.button("๐Ÿš‘ Emergency")
102
+ st.button("๐Ÿ’Š Meds")
103
+ st.button("๐Ÿฉน Bandage")
104
+ st.button("๐Ÿงฌ DNA")
105
+ st.button("๐Ÿ”ฌ Research")
106
+ st.button("๐ŸŒก๏ธ Temperature")
107
+ st.button("๐Ÿ Nutrition")
108
+
109
+ # Create another set of three columns for Learning, AI, and Writing
110
+ col4, col5, col6 = st.columns(3)
111
+
112
+ with col4:
113
+ st.markdown('''### Learning''')
114
+ st.button("๐Ÿ“š Study")
115
+ st.button("๐Ÿง  Brain")
116
+ st.button("๐Ÿ‘ฉโ€๐ŸŽ“ Graduate")
117
+ st.button("๐Ÿ“ Measure")
118
+ st.button("๐Ÿ” Search")
119
+ st.button("๐Ÿ“Š Analyze")
120
+ st.button("๐Ÿ“‹ Plan")
121
+ st.button("๐Ÿ–‹๏ธ Write")
122
+ st.button("๐Ÿ‘จโ€๐Ÿซ Teach")
123
+ st.button("๐Ÿงฉ Puzzle")
124
+
125
+ with col5:
126
+ st.markdown('''### AI''')
127
+ st.button("๐Ÿค– Robot")
128
+ st.button("๐Ÿ‘พ Game")
129
+ st.button("๐Ÿ’ป Code")
130
+ st.button("๐Ÿงฎ Calculate")
131
+ st.button("๐Ÿ“ก Connect")
132
+ st.button("๐Ÿ”‹ Power")
133
+ st.button("๐Ÿ•น๏ธ Play")
134
+ st.button("๐Ÿ–ฅ๏ธ Display")
135
+ st.button("๐Ÿง‘โ€๐Ÿ’ป Develop")
136
+ st.button("๐Ÿ‘จโ€๐Ÿ”ฌ Experiment")
137
+
138
+ with col6:
139
+ st.markdown('''### Writing''')
140
+ st.button("โœ๏ธ Author")
141
+ st.button("๐Ÿ“ Note")
142
+ st.button("๐Ÿ–Š๏ธ Pen")
143
+ st.button("๐Ÿ–‹๏ธ Sign")
144
+ st.button("๐Ÿ“š Library")
145
+ st.button("๐Ÿ”– Bookmark")
146
+ st.button("๐Ÿ““ Journal")
147
+ st.button("โœ’๏ธ Ink")
148
+ st.button("๐Ÿ“œ Scroll")
149
+
150
+ # Similarly, create columns for Coding, Remix, Movies, Video, and Audio as needed
151
+ # You can continue this pattern for organizing the rest of your buttons into columns
152
+