Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -448,36 +448,41 @@ def search_glossary(query): # 🔍Run------------------------------------------
|
|
448 |
# 🔍Run 1 - plain query
|
449 |
response = chat_with_model(query)
|
450 |
all = query + ' ' + response
|
|
|
451 |
|
452 |
# 🔍Run 2 - Specification Expert - Write a Document to Specify Inner Dialog of Expert
|
453 |
-
specquery = 'For the topic of ' + query + ', Write a specification which documents your inner dialog as an expert storyteller and word game creator.'
|
454 |
specquery = specquery + 'For the features of the specification use each of 10 high information words used in writing game rules. Think carefully and for each write and create a story and a game that is fun and humorous which allows user to get better at all modalities of language.'
|
455 |
-
specquery = specquery + 'Here is the list of word game rules you will include. Make the documentation markdown with tables and outlines and use appropriate emojis where possible. For tables please use the streamlit markdown standard with boldface and outlines and titles (#, ##, ###, ####) along with (** around text for bold)
|
456 |
specquery = specquery + WordGameRules
|
457 |
specresponse = chat_with_model(specquery)
|
458 |
all = all + specquery + ' ' + specresponse
|
|
|
459 |
|
460 |
# 🔍Run 3 - Coding Expert - Write a Streamlit Python program with app.py and requirements.txt
|
461 |
-
codequery = 'Write a streamlit python program that is function based that has an app.py and requirements.txt minimally which creates a streamlit user interface to play a word game called '
|
|
|
462 |
codequery = codequery + 'Please study my python preferences on word game features here: '
|
463 |
-
codequery = codequery + 'The objective of this exercise is to create a visually appealing UI so the user has fun interacting with these game features so each should have a small ui possibly st.expander or use of select and list boxes etc to make the UI flow well having multiple action centers where the screen and text change due to random and lists with you adding lots of tables of words etc which make it fun.'
|
464 |
codequery = codequery + WordGamePython
|
465 |
-
codequery = codequery + '
|
|
|
466 |
codequery = codequery + specresponse # feed forward expert output to next expert agent
|
467 |
coderesponse = chat_with_model(codequery)
|
468 |
all = all + codequery + ' ' + coderesponse
|
|
|
469 |
|
470 |
# todo - add back python execution located elsewhere here in comment. acw 2/24/2022/6:20
|
471 |
|
472 |
-
# 🔍Run 4 -
|
473 |
-
webquery = 'Write a
|
474 |
-
webquery = webquery + 'Please study my
|
475 |
-
webquery = webquery + 'The objective of this exercise is to create a visually appealing UI so the user has fun interacting with these game features so each should have a small ui possibly st.expander or use of select and list boxes etc to make the UI flow well having multiple action centers where the screen and text change due to random and lists with you adding lots of tables of words etc which make it fun.'
|
476 |
webquery = webquery + WordGameJavascript
|
477 |
-
webquery = webquery + '
|
|
|
478 |
webquery = webquery + coderesponse # feed forward expert output to next expert agent
|
479 |
webresponse = chat_with_model(webquery)
|
480 |
all = all + webquery + ' ' + webresponse
|
|
|
481 |
|
482 |
#PromptPrefix2 = 'Create a streamlit python user app with full code listing to create a UI implementing the plans, structure, situations and tables as python functions creating a word game with parts of speech and humorous word play which operates like word game rules and creates a compelling fun story using streamlit 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: '
|
483 |
#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:'
|
@@ -485,9 +490,9 @@ def search_glossary(query): # 🔍Run------------------------------------------
|
|
485 |
response = response + specresponse + coderesponse + webresponse
|
486 |
filename = generate_filename(response, "md")
|
487 |
create_file(filename, query, response, should_save)
|
|
|
488 |
|
489 |
-
|
490 |
-
SpeechSynthesis(all)
|
491 |
return all # 🔍Run--------------------------------------------------------
|
492 |
|
493 |
|
|
|
448 |
# 🔍Run 1 - plain query
|
449 |
response = chat_with_model(query)
|
450 |
all = query + ' ' + response
|
451 |
+
st.write('🔍Run 1 is Complete.')
|
452 |
|
453 |
# 🔍Run 2 - Specification Expert - Write a Document to Specify Inner Dialog of Expert
|
454 |
+
specquery = 'For the topic of: ' + query + ', Write a specification which documents your inner dialog as an expert storyteller and word game creator.'
|
455 |
specquery = specquery + 'For the features of the specification use each of 10 high information words used in writing game rules. Think carefully and for each write and create a story and a game that is fun and humorous which allows user to get better at all modalities of language.'
|
456 |
+
specquery = specquery + 'Here is the list of word game rules you will include. Make the documentation markdown with tables and outlines and use appropriate emojis where possible. For tables please use the streamlit markdown standard with boldface and outlines and titles (#, ##, ###, ####) along with (** around text for bold):'
|
457 |
specquery = specquery + WordGameRules
|
458 |
specresponse = chat_with_model(specquery)
|
459 |
all = all + specquery + ' ' + specresponse
|
460 |
+
st.write('🔍Run 2 is Complete.')
|
461 |
|
462 |
# 🔍Run 3 - Coding Expert - Write a Streamlit Python program with app.py and requirements.txt
|
463 |
+
codequery = 'Write a streamlit python program that is function based that has an app.py and requirements.txt minimally which creates a streamlit user interface to play a word game called: '
|
464 |
+
codequery = codequery + query + '.'
|
465 |
codequery = codequery + 'Please study my python preferences on word game features here: '
|
|
|
466 |
codequery = codequery + WordGamePython
|
467 |
+
codequery = codequery + 'The objective of this exercise is to create a visually appealing UI so the user has fun interacting with these game features so each should have a small ui possibly st.expander or use of select and list boxes etc to make the UI flow well having multiple action centers where the screen and text change due to random and lists with you adding lots of tables of words etc which make it fun: '
|
468 |
+
codequery = codequery + 'Also use this specification to serve as your feature set for the word game you are writing in python and streamlit:'
|
469 |
codequery = codequery + specresponse # feed forward expert output to next expert agent
|
470 |
coderesponse = chat_with_model(codequery)
|
471 |
all = all + codequery + ' ' + coderesponse
|
472 |
+
st.write('🔍Run 3 is Complete.')
|
473 |
|
474 |
# todo - add back python execution located elsewhere here in comment. acw 2/24/2022/6:20
|
475 |
|
476 |
+
# 🔍Run 4 - JS Expert - Write a HTML5 JS 3D program with index.html and inline JS with calls to widely used JS libraries like Aframe.
|
477 |
+
webquery = 'Write a web user interface to play a word game called ' + query '.'
|
478 |
+
webquery = webquery + 'Please study my Javascript preferences on word game features here: '
|
|
|
479 |
webquery = webquery + WordGameJavascript
|
480 |
+
webquery = webquery + 'The objective of this exercise is to create a visually appealing UI so the user has fun interacting with these game features so each should use timers, randomness, word tables, and features found in word games in a dynamic html5 app with javascript which make it fun.'
|
481 |
+
webquery = webquery + 'Also use this code written in python and streamlit to serve as a template and inject the HTML5 and Javascript features into streamlit using components and st.markdown as well as we based standards so comment where it can be integrated with Javascript web app and Streamlit UI working together.'
|
482 |
webquery = webquery + coderesponse # feed forward expert output to next expert agent
|
483 |
webresponse = chat_with_model(webquery)
|
484 |
all = all + webquery + ' ' + webresponse
|
485 |
+
st.write('🔍Run 4 is Complete.')
|
486 |
|
487 |
#PromptPrefix2 = 'Create a streamlit python user app with full code listing to create a UI implementing the plans, structure, situations and tables as python functions creating a word game with parts of speech and humorous word play which operates like word game rules and creates a compelling fun story using streamlit 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: '
|
488 |
#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:'
|
|
|
490 |
response = response + specresponse + coderesponse + webresponse
|
491 |
filename = generate_filename(response, "md")
|
492 |
create_file(filename, query, response, should_save)
|
493 |
+
queries = query + specquery + codequery + webquery
|
494 |
|
495 |
+
SpeechSynthesis(response)
|
|
|
496 |
return all # 🔍Run--------------------------------------------------------
|
497 |
|
498 |
|