awacke1 commited on
Commit
15bfefb
β€’
1 Parent(s): 6d4b42b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -21
app.py CHANGED
@@ -167,16 +167,16 @@ PromptPrefix3 = 'Create a HTML5 aframe and javascript app using appropriate libr
167
 
168
  def display_glossary_grid(roleplaying_glossary):
169
  search_urls = {
170
- "πŸ“–": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
171
- "πŸ”": lambda k: f"https://www.google.com/search?q={quote(k)}",
172
- "▢️": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
173
- "πŸ”Ž": lambda k: f"https://www.bing.com/search?q={quote(k)}",
174
- "πŸŽ₯": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
175
- "🐦": lambda k: f"https://twitter.com/search?q={quote(k)}",
176
  "πŸš€πŸŒŒArXiv": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}", # this url plus query!
177
- "πŸƒ": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
178
- "πŸ“š": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
179
- "πŸ”¬": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
180
  }
181
 
182
  for category, details in roleplaying_glossary.items():
@@ -189,23 +189,27 @@ def display_glossary_grid(roleplaying_glossary):
189
  gameterm = category + ' - ' + game + ' - ' + term
190
  links_md = ' '.join([f"[{emoji}]({url(gameterm)})" for emoji, url in search_urls.items()])
191
  #links_md = ' '.join([f"[{emoji}]({url(term)})" for emoji, url in search_urls.items()])
192
- st.markdown(f"{term} {links_md}", unsafe_allow_html=True)
 
 
193
 
194
  def display_glossary_entity(k):
195
  search_urls = {
196
- "πŸ“–": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
197
- "πŸ”": lambda k: f"https://www.google.com/search?q={quote(k)}",
198
- "▢️": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
199
- "πŸ”Ž": lambda k: f"https://www.bing.com/search?q={quote(k)}",
200
- "πŸŽ₯": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
201
- "🐦": lambda k: f"https://twitter.com/search?q={quote(k)}",
202
  "πŸš€πŸŒŒArXiv": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}", # this url plus query!
203
- "πŸƒ": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
204
- "πŸ“š": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
205
- "πŸ”¬": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
206
  }
207
  links_md = ' '.join([f"[{emoji}]({url(k)})" for emoji, url in search_urls.items()])
208
- st.markdown(f"{k} {links_md}", unsafe_allow_html=True)
 
 
209
 
210
 
211
  roleplaying_glossary = {
@@ -698,7 +702,6 @@ def display_glossary_grid(roleplaying_glossary):
698
  "πŸƒAnalyst": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
699
  "πŸ“šPyCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
700
  "πŸ”¬JSCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
701
-
702
  }
703
 
704
  for category, details in roleplaying_glossary.items():
 
167
 
168
  def display_glossary_grid(roleplaying_glossary):
169
  search_urls = {
170
+ "πŸ“–Wiki": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
171
+ "πŸ”Google": lambda k: f"https://www.google.com/search?q={quote(k)}",
172
+ "▢️YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
173
+ "πŸ”ŽBing": lambda k: f"https://www.bing.com/search?q={quote(k)}",
174
+ "πŸŽ₯YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
175
+ "🐦Twitter": lambda k: f"https://twitter.com/search?q={quote(k)}",
176
  "πŸš€πŸŒŒArXiv": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}", # this url plus query!
177
+ "πŸƒAnalyst": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
178
+ "πŸ“šPyCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
179
+ "πŸ”¬JSCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
180
  }
181
 
182
  for category, details in roleplaying_glossary.items():
 
189
  gameterm = category + ' - ' + game + ' - ' + term
190
  links_md = ' '.join([f"[{emoji}]({url(gameterm)})" for emoji, url in search_urls.items()])
191
  #links_md = ' '.join([f"[{emoji}]({url(term)})" for emoji, url in search_urls.items()])
192
+ #st.markdown(f"{term} {links_md}", unsafe_allow_html=True)
193
+ st.markdown(f"**{term}** <small>{links_md}</small>", unsafe_allow_html=True)
194
+
195
 
196
  def display_glossary_entity(k):
197
  search_urls = {
198
+ "πŸ“–Wiki": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
199
+ "πŸ”Google": lambda k: f"https://www.google.com/search?q={quote(k)}",
200
+ "▢️YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
201
+ "πŸ”ŽBing": lambda k: f"https://www.bing.com/search?q={quote(k)}",
202
+ "πŸŽ₯YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
203
+ "🐦Twitter": lambda k: f"https://twitter.com/search?q={quote(k)}",
204
  "πŸš€πŸŒŒArXiv": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}", # this url plus query!
205
+ "πŸƒAnalyst": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
206
+ "πŸ“šPyCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
207
+ "πŸ”¬JSCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
208
  }
209
  links_md = ' '.join([f"[{emoji}]({url(k)})" for emoji, url in search_urls.items()])
210
+ #st.markdown(f"{k} {links_md}", unsafe_allow_html=True)
211
+ st.markdown(f"**{k}** <small>{links_md}</small>", unsafe_allow_html=True)
212
+
213
 
214
 
215
  roleplaying_glossary = {
 
702
  "πŸƒAnalyst": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
703
  "πŸ“šPyCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
704
  "πŸ”¬JSCoder": lambda k: f"https://huggingface.co/spaces/awacke1/{Site_Name}?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
 
705
  }
706
 
707
  for category, details in roleplaying_glossary.items():