Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -109,10 +109,13 @@ def display_glossary_grid(glossary):
|
|
109 |
cols = st.columns(3) # Create three columns
|
110 |
for idx, category in enumerate(group):
|
111 |
with cols[idx]:
|
112 |
-
st.markdown(f"### {category}")
|
|
|
113 |
terms = glossary[category]
|
114 |
for term in terms:
|
115 |
-
|
|
|
|
|
116 |
|
117 |
# Streamlined UI for displaying buttons with scores, integrating emojis
|
118 |
def display_buttons_with_scores():
|
@@ -123,6 +126,9 @@ def display_buttons_with_scores():
|
|
123 |
score = load_score(key)
|
124 |
if st.button(f"{term} {score}🚀", key=key):
|
125 |
update_score(key)
|
|
|
|
|
|
|
126 |
search_glossary('Create a three level markdown outline with 3 subpoints each where each line defines and writes out the core technology descriptions with appropriate emojis for the glossary term: ' + term)
|
127 |
st.experimental_rerun()
|
128 |
|
@@ -147,6 +153,8 @@ def create_search_url_google(keyword):
|
|
147 |
base_url = "https://www.google.com/search?q="
|
148 |
return base_url + keyword.replace(' ', '+')
|
149 |
|
|
|
|
|
150 |
|
151 |
def display_images_and_wikipedia_summaries():
|
152 |
st.title('Gallery with Related Stories')
|
@@ -166,12 +174,15 @@ def display_images_and_wikipedia_summaries():
|
|
166 |
google_url = create_search_url_google(keyword)
|
167 |
youtube_url = create_search_url_youtube(keyword)
|
168 |
bing_url = create_search_url_bing(keyword)
|
169 |
-
|
|
|
170 |
links_md = f"""
|
171 |
[Wikipedia]({wikipedia_url}) |
|
172 |
[Google]({google_url}) |
|
173 |
[YouTube]({youtube_url}) |
|
174 |
[Bing]({bing_url})
|
|
|
|
|
175 |
"""
|
176 |
st.markdown(links_md)
|
177 |
|
|
|
109 |
cols = st.columns(3) # Create three columns
|
110 |
for idx, category in enumerate(group):
|
111 |
with cols[idx]:
|
112 |
+
#st.markdown(f"### {category}")
|
113 |
+
|
114 |
terms = glossary[category]
|
115 |
for term in terms:
|
116 |
+
t=term
|
117 |
+
|
118 |
+
#st.write(f"- {t}")
|
119 |
|
120 |
# Streamlined UI for displaying buttons with scores, integrating emojis
|
121 |
def display_buttons_with_scores():
|
|
|
126 |
score = load_score(key)
|
127 |
if st.button(f"{term} {score}🚀", key=key):
|
128 |
update_score(key)
|
129 |
+
|
130 |
+
|
131 |
+
# Bonus stage!
|
132 |
search_glossary('Create a three level markdown outline with 3 subpoints each where each line defines and writes out the core technology descriptions with appropriate emojis for the glossary term: ' + term)
|
133 |
st.experimental_rerun()
|
134 |
|
|
|
153 |
base_url = "https://www.google.com/search?q="
|
154 |
return base_url + keyword.replace(' ', '+')
|
155 |
|
156 |
+
def create_search_url_twitter(keyword):
|
157 |
+
return f"https://twitter.com/search?q={keyword.replace(' ', '+')}&src=typed_query"
|
158 |
|
159 |
def display_images_and_wikipedia_summaries():
|
160 |
st.title('Gallery with Related Stories')
|
|
|
174 |
google_url = create_search_url_google(keyword)
|
175 |
youtube_url = create_search_url_youtube(keyword)
|
176 |
bing_url = create_search_url_bing(keyword)
|
177 |
+
twitter_url = create_search_url_twitter(keyword) # Twitter search link
|
178 |
+
|
179 |
links_md = f"""
|
180 |
[Wikipedia]({wikipedia_url}) |
|
181 |
[Google]({google_url}) |
|
182 |
[YouTube]({youtube_url}) |
|
183 |
[Bing]({bing_url})
|
184 |
+
[Twitter]({twitter_url}) # Added Twitter link
|
185 |
+
|
186 |
"""
|
187 |
st.markdown(links_md)
|
188 |
|