Update app.py
Browse files
app.py
CHANGED
@@ -155,19 +155,19 @@ def search_arxiv(query):
|
|
155 |
|
156 |
# Set page configuration with a title and favicon
|
157 |
st.set_page_config(
|
158 |
-
page_title="
|
159 |
-
page_icon="
|
160 |
layout="wide",
|
161 |
initial_sidebar_state="expanded",
|
162 |
menu_items={
|
163 |
'Get Help': 'https://huggingface.co/awacke1',
|
164 |
-
'Report a bug': "https://huggingface.co/spaces/awacke1
|
165 |
-
'About': "#
|
166 |
}
|
167 |
)
|
168 |
|
169 |
# Prompts for App, for App Product, and App Product Code
|
170 |
-
PromptPrefix = 'Create a
|
171 |
PromptPrefix2 = 'Create a streamlit python user app with full code listing to create a UI implementing the using streamlit or gradio or huggingface to create user interface elements like emoji buttons, sliders, drop downs, and data interfaces like dataframes to show tables, session_state to track inventory, character advancement and experience, locations, file_uploader to allow the user to add images which are saved and referenced shown in gallery, camera_input to take character picture, on_change = function callbacks with continual running plots that change when you change data or click a button, randomness and word and letter rolls using emojis and st.markdown, st.expander for groupings and clusters of things, st.columns and other UI controls in streamlit as a game. Create inline data tables and list dictionaries for entities implemented as variables for the word game rule entities and stats. Design it as a fun data driven game app and show full python code listing for this ruleset and thematic story plot line: '
|
172 |
PromptPrefix3 = 'Create a HTML5 aframe and javascript app using appropriate libraries to create a word game simulation with advanced libraries like aframe to render 3d scenes creating moving entities that stay within a bounding box but show text and animation in 3d for inventory, components and story entities. Show full code listing. Add a list of new random entities say 3 of a few different types to any list appropriately and use emojis to make things easier and fun to read. Use appropriate emojis in labels. Create the UI to implement storytelling in the style of a dungeon master, with features using three emoji appropriate text plot twists and recurring interesting funny fascinating and complex almost poetic named characters with genius traits and file IO, randomness, ten point choice lists, math distribution tradeoffs, witty humorous dilemnas with emoji , rewards, variables, reusable functions with parameters, and data driven app with python libraries and streamlit components for Javascript and HTML5. Use appropriate emojis for labels to summarize and list parts, function, conditions for topic:'
|
173 |
|
@@ -179,10 +179,10 @@ def display_glossary_grid(roleplaying_glossary):
|
|
179 |
"βΆοΈ": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
|
180 |
"π": lambda k: f"https://www.bing.com/search?q={quote(k)}",
|
181 |
"π¦": lambda k: f"https://twitter.com/search?q={quote(k)}",
|
182 |
-
"π²": lambda k: f"https://huggingface.co/spaces/awacke1/
|
183 |
-
"π": lambda k: f"https://huggingface.co/spaces/awacke1/
|
184 |
-
"π": lambda k: f"https://huggingface.co/spaces/awacke1/
|
185 |
-
"π¬": lambda k: f"https://huggingface.co/spaces/awacke1/
|
186 |
}
|
187 |
|
188 |
for category, details in roleplaying_glossary.items():
|
@@ -204,10 +204,10 @@ def display_glossary_entity(k):
|
|
204 |
"βΆοΈ": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
|
205 |
"π": lambda k: f"https://www.bing.com/search?q={quote(k)}",
|
206 |
"π¦": lambda k: f"https://twitter.com/search?q={quote(k)}",
|
207 |
-
"π²": lambda k: f"https://huggingface.co/spaces/awacke1/
|
208 |
-
"π": lambda k: f"https://huggingface.co/spaces/awacke1/
|
209 |
-
"π": lambda k: f"https://huggingface.co/spaces/awacke1/
|
210 |
-
"π¬": lambda k: f"https://huggingface.co/spaces/awacke1/
|
211 |
}
|
212 |
links_md = ' '.join([f"[{emoji}]({url(k)})" for emoji, url in search_urls.items()])
|
213 |
st.markdown(f"{k} {links_md}", unsafe_allow_html=True)
|
@@ -713,7 +713,7 @@ def display_glossary_grid(roleplaying_glossary):
|
|
713 |
"π": lambda k: f"https://www.google.com/search?q={quote(k)}",
|
714 |
"βΆοΈ": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
|
715 |
"π": lambda k: f"https://www.bing.com/search?q={quote(k)}",
|
716 |
-
"π²": lambda k: f"https://huggingface.co/spaces/awacke1/
|
717 |
|
718 |
}
|
719 |
|
@@ -860,7 +860,7 @@ def create_search_url_google(keyword):
|
|
860 |
return base_url + keyword.replace(' ', '+')
|
861 |
|
862 |
def create_search_url_ai(keyword):
|
863 |
-
base_url = "https://huggingface.co/spaces/awacke1/
|
864 |
return base_url + keyword.replace(' ', '+')
|
865 |
|
866 |
def display_images_and_wikipedia_summaries():
|
|
|
155 |
|
156 |
# Set page configuration with a title and favicon
|
157 |
st.set_page_config(
|
158 |
+
page_title="ππWorld Ship Design Program",
|
159 |
+
page_icon="ππππ",
|
160 |
layout="wide",
|
161 |
initial_sidebar_state="expanded",
|
162 |
menu_items={
|
163 |
'Get Help': 'https://huggingface.co/awacke1',
|
164 |
+
'Report a bug': "https://huggingface.co/spaces/awacke1",
|
165 |
+
'About': "# ππWorld-Ship-Design"
|
166 |
}
|
167 |
)
|
168 |
|
169 |
# Prompts for App, for App Product, and App Product Code
|
170 |
+
PromptPrefix = 'Create a specification with streamlit functions creating markdown outlines and tables rich with appropriate emojis for methodical step by step rules defining the concepts at play. Use story structure architect rules to plan, structure and write three dramatic situations to include in the rules and how to play by matching the theme for topic of '
|
171 |
PromptPrefix2 = 'Create a streamlit python user app with full code listing to create a UI implementing the using streamlit or gradio or huggingface to create user interface elements like emoji buttons, sliders, drop downs, and data interfaces like dataframes to show tables, session_state to track inventory, character advancement and experience, locations, file_uploader to allow the user to add images which are saved and referenced shown in gallery, camera_input to take character picture, on_change = function callbacks with continual running plots that change when you change data or click a button, randomness and word and letter rolls using emojis and st.markdown, st.expander for groupings and clusters of things, st.columns and other UI controls in streamlit as a game. Create inline data tables and list dictionaries for entities implemented as variables for the word game rule entities and stats. Design it as a fun data driven game app and show full python code listing for this ruleset and thematic story plot line: '
|
172 |
PromptPrefix3 = 'Create a HTML5 aframe and javascript app using appropriate libraries to create a word game simulation with advanced libraries like aframe to render 3d scenes creating moving entities that stay within a bounding box but show text and animation in 3d for inventory, components and story entities. Show full code listing. Add a list of new random entities say 3 of a few different types to any list appropriately and use emojis to make things easier and fun to read. Use appropriate emojis in labels. Create the UI to implement storytelling in the style of a dungeon master, with features using three emoji appropriate text plot twists and recurring interesting funny fascinating and complex almost poetic named characters with genius traits and file IO, randomness, ten point choice lists, math distribution tradeoffs, witty humorous dilemnas with emoji , rewards, variables, reusable functions with parameters, and data driven app with python libraries and streamlit components for Javascript and HTML5. Use appropriate emojis for labels to summarize and list parts, function, conditions for topic:'
|
173 |
|
|
|
179 |
"βΆοΈ": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
|
180 |
"π": lambda k: f"https://www.bing.com/search?q={quote(k)}",
|
181 |
"π¦": lambda k: f"https://twitter.com/search?q={quote(k)}",
|
182 |
+
"π²": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}", # this url plus query!
|
183 |
+
"π": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
|
184 |
+
"π": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
|
185 |
+
"π¬": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
|
186 |
}
|
187 |
|
188 |
for category, details in roleplaying_glossary.items():
|
|
|
204 |
"βΆοΈ": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
|
205 |
"π": lambda k: f"https://www.bing.com/search?q={quote(k)}",
|
206 |
"π¦": lambda k: f"https://twitter.com/search?q={quote(k)}",
|
207 |
+
"π²": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}", # this url plus query!
|
208 |
+
"π": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
|
209 |
+
"π": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
|
210 |
+
"π¬": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
|
211 |
}
|
212 |
links_md = ' '.join([f"[{emoji}]({url(k)})" for emoji, url in search_urls.items()])
|
213 |
st.markdown(f"{k} {links_md}", unsafe_allow_html=True)
|
|
|
713 |
"π": lambda k: f"https://www.google.com/search?q={quote(k)}",
|
714 |
"βΆοΈ": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
|
715 |
"π": lambda k: f"https://www.bing.com/search?q={quote(k)}",
|
716 |
+
"π²": lambda k: f"https://huggingface.co/spaces/awacke1/World-Ship-Design?q={quote(k)}", # this url plus query!
|
717 |
|
718 |
}
|
719 |
|
|
|
860 |
return base_url + keyword.replace(' ', '+')
|
861 |
|
862 |
def create_search_url_ai(keyword):
|
863 |
+
base_url = "https://huggingface.co/spaces/awacke1/World-Ship-Design?q="
|
864 |
return base_url + keyword.replace(' ', '+')
|
865 |
|
866 |
def display_images_and_wikipedia_summaries():
|