Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,20 @@ import os
|
|
3 |
import json
|
4 |
from PIL import Image
|
5 |
|
6 |
-
st.set_page_config(page_title="π§ πβοΈ
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Directory to store scores
|
9 |
score_dir = "scores"
|
@@ -39,6 +52,13 @@ def load_score(key):
|
|
39 |
return score_data["score"]
|
40 |
return 0
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
# Display headers and buttons with scores
|
43 |
def display_buttons_with_scores():
|
44 |
headers = ["Inputs", "Outputs", "Health", "Learning", "AI", "Writing"]
|
@@ -63,6 +83,12 @@ def display_buttons_with_scores():
|
|
63 |
# Reload the page to reflect the updated score
|
64 |
st.experimental_rerun()
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
# Main application logic
|
67 |
if __name__ == "__main__":
|
68 |
st.markdown('# Remixable!')
|
@@ -118,36 +144,15 @@ def display_images_and_wikipedia_summaries():
|
|
118 |
|
119 |
display_images_and_wikipedia_summaries()
|
120 |
|
121 |
-
st.markdown('#
|
122 |
-
|
123 |
-
'#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.',
|
124 |
-
'#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.',
|
125 |
-
'#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.'
|
126 |
-
}
|
127 |
-
for dragon, story in dragons.items():
|
128 |
-
st.subheader(dragon)
|
129 |
-
st.markdown(f"- {story}")
|
130 |
-
st.markdown('''
|
131 |
-
https://github.com/AaronCWacker/ThreeDragons
|
132 |
-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/vkNh6XnEtGSj8mXea1W6p.png)
|
133 |
-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/Kr_nqtaglHE_aiFxWH9zF.png)
|
134 |
-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/WLRKWqB6dKlMH6saVV9cX.png)
|
135 |
-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/Lyazf6FuX4nH__4illVki.png)
|
136 |
-
![image/png](https://cdn-uploads.huggingface.co/production/uploads/620630b603825909dcbeba35/ZemsxlT3b5idB0W5IjL1o.png)
|
137 |
-
''')
|
138 |
-
|
139 |
-
# Function to handle repeated query parameters
|
140 |
def get_all_query_params(key):
|
141 |
return st.query_params().get(key, [])
|
142 |
|
143 |
-
# Function to clear all query parameters
|
144 |
def clear_query_params():
|
145 |
-
st.query_params()
|
146 |
-
|
147 |
-
|
148 |
-
st.title("Query Parameters Demo")
|
149 |
|
150 |
-
|
151 |
st.write("Current Query Parameters:", st.query_params)
|
152 |
|
153 |
# Example: Using query parameters to navigate or trigger functionalities
|
|
|
3 |
import json
|
4 |
from PIL import Image
|
5 |
|
6 |
+
st.set_page_config(page_title="π§ πβοΈRemixable AIπ¨ππ¨βπ«", page_icon="π", layout="wide")
|
7 |
+
|
8 |
+
glossary = {
|
9 |
+
"π Vaccinate": ["mRNA vaccines", "Nanoparticle delivery systems", "Universal flu vaccine"],
|
10 |
+
"π©Ί Diagnose": ["AI-driven diagnostic tools", "Wearable health monitors", "Liquid biopsies"],
|
11 |
+
"π₯ Hospital": ["Telemedicine", "Robot-assisted surgery", "Smart hospitals"],
|
12 |
+
"π Emergency": ["Point-of-care testing", "Drone delivery for medical supplies", "Mobile stroke units"],
|
13 |
+
"π Meds": ["Precision medicine", "Biologics for chronic diseases", "Pharmacogenomics"],
|
14 |
+
"π©Ή Bandage": ["Smart bandages", "Biodegradable bandages", "Hydrogel bandages"],
|
15 |
+
"𧬠DNA": ["Gene editing (CRISPR-Cas9)", "Gene therapy for inherited diseases", "Synthetic biology"],
|
16 |
+
"π¬ Research": ["Big Data in healthcare", "3D bioprinting of tissues", "Nanotechnology in medicine"],
|
17 |
+
"π‘οΈ Temperature": ["Wearable temperature monitors", "Infrared thermography", "Microfluidic devices"],
|
18 |
+
"π Nutrition": ["Personalized nutrition", "Nutrigenomics", "Functional foods"],
|
19 |
+
}
|
20 |
|
21 |
# Directory to store scores
|
22 |
score_dir = "scores"
|
|
|
52 |
return score_data["score"]
|
53 |
return 0
|
54 |
|
55 |
+
# Function to display the glossary for a selected area
|
56 |
+
def display_glossary(area):
|
57 |
+
st.subheader(f"Glossary for {area}")
|
58 |
+
terms = glossary[area]
|
59 |
+
for term in terms:
|
60 |
+
st.write(f"- {term}")
|
61 |
+
|
62 |
# Display headers and buttons with scores
|
63 |
def display_buttons_with_scores():
|
64 |
headers = ["Inputs", "Outputs", "Health", "Learning", "AI", "Writing"]
|
|
|
83 |
# Reload the page to reflect the updated score
|
84 |
st.experimental_rerun()
|
85 |
|
86 |
+
# Display buttons for each area
|
87 |
+
cols = st.columns(5)
|
88 |
+
for i, (area, terms) in enumerate(glossary.items()):
|
89 |
+
if cols[i % 5].button(area):
|
90 |
+
display_glossary(area)
|
91 |
+
|
92 |
# Main application logic
|
93 |
if __name__ == "__main__":
|
94 |
st.markdown('# Remixable!')
|
|
|
144 |
|
145 |
display_images_and_wikipedia_summaries()
|
146 |
|
147 |
+
st.markdown('# π©Ί Remixable AI/UI/UX for Healers by Aaron Wacker')
|
148 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
def get_all_query_params(key):
|
150 |
return st.query_params().get(key, [])
|
151 |
|
|
|
152 |
def clear_query_params():
|
153 |
+
st.query_params()
|
|
|
|
|
|
|
154 |
|
155 |
+
st.markdown("### Query Parameters - These Deep Link Map to Remixable Methods")
|
156 |
st.write("Current Query Parameters:", st.query_params)
|
157 |
|
158 |
# Example: Using query parameters to navigate or trigger functionalities
|