awacke1 commited on
Commit
71c9de2
1 Parent(s): c4159b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +133 -177
app.py CHANGED
@@ -14,7 +14,6 @@ import textract
14
  import time
15
  import zipfile
16
  import dotenv
17
-
18
  from gradio_client import Client
19
  from audio_recorder_streamlit import audio_recorder
20
  from bs4 import BeautifulSoup
@@ -36,7 +35,6 @@ title="🔬🧠ScienceBrain.AI"
36
  helpURL='https://huggingface.co/awacke1'
37
  bugURL='https://huggingface.co/spaces/awacke1'
38
  icons='🔬'
39
-
40
  st.set_page_config(
41
  page_title=title,
42
  page_icon=icons,
@@ -50,12 +48,6 @@ st.set_page_config(
50
  )
51
 
52
 
53
- def load_file(file_name):
54
- with open(file_name, "r", encoding='utf-8') as file:
55
- #with open(file_name, "r") as file:
56
- content = file.read()
57
- return content
58
-
59
 
60
  # HTML5 based Speech Synthesis (Text to Speech in Browser)
61
  @st.cache_resource
@@ -90,46 +82,41 @@ def SpeechSynthesis(result):
90
  def parse_to_markdown(text):
91
  return text
92
 
93
-
94
-
95
-
96
- import re
 
97
 
98
  def extract_urls(text):
99
  try:
100
- # Regular expression patterns to find the required fields
101
  date_pattern = re.compile(r'### (\d{2} \w{3} \d{4})')
102
  abs_link_pattern = re.compile(r'\[(.*?)\]\((https://arxiv\.org/abs/\d+\.\d+)\)')
103
  pdf_link_pattern = re.compile(r'\[⬇️\]\((https://arxiv\.org/pdf/\d+\.\d+)\)')
104
  title_pattern = re.compile(r'### \d{2} \w{3} \d{4} \| \[(.*?)\]')
105
-
106
- # Find all occurrences of the required fields using the regular expression patterns
107
  date_matches = date_pattern.findall(text)
108
  abs_link_matches = abs_link_pattern.findall(text)
109
  pdf_link_matches = pdf_link_pattern.findall(text)
110
  title_matches = title_pattern.findall(text)
111
 
112
- # Generate markdown string with the extracted fields
113
  markdown_text = ""
114
  for i in range(len(date_matches)):
115
  date = date_matches[i]
116
  title = title_matches[i]
117
  abs_link = abs_link_matches[i][1]
118
  pdf_link = pdf_link_matches[i]
119
-
120
  markdown_text += f"**Date:** {date}\n\n"
121
  markdown_text += f"**Title:** {title}\n\n"
122
  markdown_text += f"**Abstract Link:** [{abs_link}]({abs_link})\n\n"
123
  markdown_text += f"**PDF Link:** [{pdf_link}]({pdf_link})\n\n"
124
  markdown_text += "---\n\n"
125
-
126
  return markdown_text
 
127
  except:
128
  st.write('.')
129
  return ''
130
 
131
-
132
-
133
  def download_pdfs(urls):
134
  local_files = []
135
  for url in urls:
@@ -153,9 +140,6 @@ def generate_html(local_files):
153
  def search_arxiv(query):
154
  start_time = time.strftime("%Y-%m-%d %H:%M:%S")
155
  client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
156
-
157
- # Search 1 - Retrieve the Papers
158
- client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
159
  response1 = client.predict(
160
  query,
161
  20,
@@ -165,8 +149,6 @@ def search_arxiv(query):
165
  )
166
  Question = '### 🔎 ' + query + '\r\n' # Format for markdown display with links
167
  References = response1[0]
168
-
169
- # URLs from the response
170
  ReferenceLinks = extract_urls(References)
171
 
172
  RunSecondQuery = True
@@ -187,8 +169,6 @@ def search_arxiv(query):
187
 
188
  st.write('🔍Run of Multi-Agent System Paper Summary Spec is Complete')
189
  end_time = time.strftime("%Y-%m-%d %H:%M:%S")
190
-
191
- # Output
192
  start_timestamp = time.mktime(time.strptime(start_time, "%Y-%m-%d %H:%M:%S"))
193
  end_timestamp = time.mktime(time.strptime(end_time, "%Y-%m-%d %H:%M:%S"))
194
  elapsed_seconds = end_timestamp - start_timestamp
@@ -222,132 +202,111 @@ PromptPrefix = 'Create a specification with streamlit functions creating markdow
222
  PromptPrefix2 = 'Create a streamlit python user app with full code listing to create a UI implementing the using streamlit, gradio, huggingface to create user interface elements like emoji buttons, sliders, drop downs, and data interfaces like dataframes to show tables, session_statematching this ruleset and thematic story plot line: '
223
  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:'
224
 
225
-
226
  roleplaying_glossary = {
227
- "🤖 AI Concepts": {
228
- "MoE (Mixture of Experts) 🧠": [
229
- "What are Multi Agent Systems for Health",
230
- "What is Mixture of Experts for Health",
231
- "What are Semantic and Episodic Memory and what is Mirroring for Behavioral Health",
232
- "What are Self Rewarding AI Systems for Health",
233
- "How are AGI and AMI systems created using Multi Agent Systems and Mixture of Experts for Health"
234
- ],
235
- "Multi Agent Systems (MAS) 🤝": [
236
- "Distributed AI systems",
237
- "Autonomous agents interacting",
238
- "Cooperative and competitive behavior",
239
- "Decentralized problem-solving",
240
- "Applications in robotics, simulations, and more"
241
- ],
242
- "Self Rewarding AI 🎁": [
243
- "Intrinsic motivation for AI agents",
244
- "Autonomous goal setting and achievement",
245
- "Exploration and curiosity-driven learning",
246
- "Potential for open-ended development",
247
- "Research area in reinforcement learning"
248
- ],
249
- "Semantic and Episodic Memory 📚": [
250
- "Two types of long-term memory",
251
- "Semantic: facts and general knowledge",
252
- "Episodic: personal experiences and events",
253
- "Crucial for AI systems to understand and reason",
254
- "Research in knowledge representation and retrieval"
255
- ]
256
- },
257
- "🛠️ AI Tools & Platforms": {
258
- "AutoGen 🔧": [
259
- "Automated machine learning (AutoML) tool",
260
- "Generates AI models based on requirements",
261
- "Simplifies AI development process",
262
- "Accessible to non-experts",
263
- "Integration with various data sources"
264
- ],
265
- "ChatDev 💬": [
266
- "Platform for building chatbots and conversational AI",
267
- "Drag-and-drop interface for designing chat flows",
268
- "Pre-built templates and integrations",
269
- "Supports multiple messaging platforms",
270
- "Analytics and performance tracking"
271
- ],
272
- "Omniverse 🌐": [
273
- "Nvidia's 3D simulation and collaboration platform",
274
- "Physically accurate virtual worlds",
275
- "Supports AI training and testing",
276
- "Used in industries like robotics, architecture, and gaming",
277
- "Enables seamless collaboration and data exchange"
278
- ],
279
- "Lumiere 🎥": [
280
- "AI-powered video analytics platform",
281
- "Extracts insights and metadata from video content",
282
- "Facial recognition and object detection",
283
- "Sentiment analysis and scene understanding",
284
- "Applications in security, media, and marketing"
285
- ],
286
- "SORA 🏗️": [
287
- "Scalable Open Research Architecture",
288
- "Framework for distributed AI research and development",
289
- "Modular and extensible design",
290
- "Facilitates collaboration and reproducibility",
291
- "Supports various AI algorithms and models"
292
- ]
293
- },
294
- "🔬 Science Topics": {
295
- "Physics 🔭": [
296
- "Astrophysics: galaxies, cosmology, planets, high energy phenomena, instrumentation, solar/stellar",
297
-
298
- "Condensed Matter: disordered systems, materials science, nano/mesoscale, quantum gases, soft matter, statistical mechanics, superconductivity",
299
- "General Relativity and Quantum Cosmology",
300
- "High Energy Physics: experiment, lattice, phenomenology, theory",
301
- "Mathematical Physics",
302
- "Nonlinear Sciences: adaptation, cellular automata, chaos, solvable systems, pattern formation",
303
- "Nuclear: experiment, theory",
304
- "Physics: accelerators, atmospherics, atomic/molecular, biophysics, chemical, computational, education, fluids, geophysics, optics, plasma, popular, space"
305
- ],
306
- "Mathematics ": [
307
- "Algebra: geometry, topology, number theory, combinatorics, representation theory",
308
- "Analysis: PDEs, functional, numerical, spectral theory, ODEs, complex variables",
309
- "Geometry: algebraic, differential, metric, symplectic, topological",
310
- "Probability and Statistics",
311
- "Applied Math: information theory, optimization and control"
312
- ],
313
- "Computer Science 💻": [
314
- "Artificial Intelligence and Machine Learning",
315
-
316
- "Computation and Language, Complexity, Engineering, Finance, Science",
317
- "Computer Vision, Graphics, Robotics",
318
- "Cryptography, Security, Blockchain",
319
- "Data Structures, Algorithms, Databases",
320
- "Distributed and Parallel Computing",
321
- "Formal Languages, Automata, Logic",
322
- "Information Theory, Signal Processing",
323
- "Networks, Internet Architecture, Social Networks",
324
- "Programming Languages, Software Engineering"
325
- ],
326
- "Quantitative Biology 🧬": [
327
- "Biomolecules, Cell Behavior, Genomics",
328
- "Molecular Networks, Neurons and Cognition",
329
- "Populations, Evolution, Ecology",
330
- "Quantitative Methods, Subcellular Processes",
331
- "Tissues, Organs, Organisms"
332
- ],
333
-
334
- "Quantitative Finance 📈": [
335
- "Computational and Mathematical Finance",
336
- "Econometrics and Statistical Finance",
337
-
338
- "Economics, Portfolio Management, Trading",
339
- "Pricing, Risk Management"
340
- ],
341
- "Electrical Engineering 🔌": [
342
- "Audio, Speech, Image and Video Processing",
343
- "Communications and Information Theory",
344
- "Signal Processing, Controls, Robotics",
345
- "Electronic Circuits, Embedded Systems"
346
- ]
347
- }
348
  }
349
-
350
-
351
  # This displays per video and per image.
352
  @st.cache_resource
353
  def display_glossary_entity(k):
@@ -356,11 +315,11 @@ def display_glossary_entity(k):
356
  "🃏Analyst": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
357
  "📚PyCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
358
  "🔬JSCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
359
- "📖Wiki": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
360
- "🔍Google": lambda k: f"https://www.google.com/search?q={quote(k)}",
361
- "🔎Bing": lambda k: f"https://www.bing.com/search?q={quote(k)}",
362
- "🎥YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
363
- "🐦Twitter": lambda k: f"https://twitter.com/search?q={quote(k)}",
364
  }
365
  links_md = ' '.join([f"[{emoji}]({url(k)})" for emoji, url in search_urls.items()])
366
  #st.markdown(f"{k} {links_md}", unsafe_allow_html=True)
@@ -374,12 +333,12 @@ def display_glossary_grid(roleplaying_glossary):
374
  "🃏Analyst": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
375
  "📚PyCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
376
  "🔬JSCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
377
- "📖Wiki": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
378
- "🔍Google": lambda k: f"https://www.google.com/search?q={quote(k)}",
379
- "▶️YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
380
- "🔎Bing": lambda k: f"https://www.bing.com/search?q={quote(k)}",
381
- "🎥YouTube": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
382
- "🐦Twitter": lambda k: f"https://twitter.com/search?q={quote(k)}",
383
  }
384
 
385
  for category, details in roleplaying_glossary.items():
@@ -695,6 +654,10 @@ ShowSideImages=False
695
  if ShowSideImages:
696
  SideBarImageShuffle()
697
 
 
 
 
 
698
  # Ensure the directory for storing scores exists
699
  score_dir = "scores"
700
  os.makedirs(score_dir, exist_ok=True)
@@ -711,7 +674,7 @@ def update_score(key, increment=1):
711
  score_data = json.load(file)
712
  else:
713
  score_data = {"clicks": 0, "score": 0}
714
- score_data["clicks"] += 1
715
  score_data["score"] += increment
716
  with open(score_file, "w") as file:
717
  json.dump(score_data, file)
@@ -904,8 +867,6 @@ topic_emojis = {
904
 
905
  # Adjusted display_buttons_with_scores function
906
  def display_buttons_with_scores(num_columns_text):
907
-
908
-
909
  for category, games in roleplaying_glossary.items():
910
  category_emoji = topic_emojis.get(category, "🔍") # Default to search icon if no match
911
  st.markdown(f"## {category_emoji} {category}")
@@ -915,14 +876,9 @@ def display_buttons_with_scores(num_columns_text):
915
  key = f"{category}_{game}_{term}".replace(' ', '_').lower()
916
  score = load_score(key)
917
  if st.button(f"{game_emoji} {category} {game} {term} {score}", key=key):
918
- update_score(key)
919
- # Create a dynamic query incorporating emojis and formatting for clarity
920
  query_prefix = f"{category_emoji} {game_emoji} ** {category} - {game} - {term} - **"
921
- # ----------------------------------------------------------------------------------------------
922
- #query_body = f"Create a detailed outline for **{term}** with subpoints highlighting key aspects, using emojis for visual engagement. Include step-by-step rules and boldface important entities and ruleset elements."
923
- query_body = f"Create a streamlit python app.py that produces a detailed markdown outline and emoji laden user interface with labels with the entity name and emojis in all labels with a set of streamlit UI components with drop down lists and dataframes and buttons with expander and sidebar for the app to run the data as default values mostly in text boxes. Feature a 3 point outline sith 3 subpoints each where each line has about six words describing this and also contain appropriate emoji for creating sumamry of all aspeccts of this topic. an outline for **{term}** with subpoints highlighting key aspects, using emojis for visual engagement. Include step-by-step rules and boldface important entities and ruleset elements."
924
- response = search_glossary(query_prefix + query_body)
925
-
926
 
927
 
928
  def get_all_query_params(key):
@@ -1604,16 +1560,16 @@ if AddAFileForContext:
1604
  filename = generate_filename(f"{user_prompt}_section_{i+1}", choice)
1605
  create_file(filename, user_prompt, response, should_save)
1606
  st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
1607
-
 
 
1608
 
1609
- num_columns_video=st.slider(key="num_columns_video", label="Choose Number of Video Columns", min_value=1, max_value=15, value=2)
1610
  display_videos_and_links(num_columns_video) # Video Jump Grid
1611
 
1612
- num_columns_images=st.slider(key="num_columns_images", label="Choose Number of Image Columns", min_value=1, max_value=15, value=2)
1613
  display_images_and_wikipedia_summaries(num_columns_images) # Image Jump Grid
1614
 
1615
- display_glossary_grid(roleplaying_glossary) # Word Glossary Jump Grid - Dynamically calculates columns based on details length to keep topic together
1616
-
1617
  num_columns_text=st.slider(key="num_columns_text", label="Choose Number of Text Columns", min_value=1, max_value=15, value=4)
1618
  display_buttons_with_scores(num_columns_text) # Feedback Jump Grid
1619
 
 
14
  import time
15
  import zipfile
16
  import dotenv
 
17
  from gradio_client import Client
18
  from audio_recorder_streamlit import audio_recorder
19
  from bs4 import BeautifulSoup
 
35
  helpURL='https://huggingface.co/awacke1'
36
  bugURL='https://huggingface.co/spaces/awacke1'
37
  icons='🔬'
 
38
  st.set_page_config(
39
  page_title=title,
40
  page_icon=icons,
 
48
  )
49
 
50
 
 
 
 
 
 
 
51
 
52
  # HTML5 based Speech Synthesis (Text to Speech in Browser)
53
  @st.cache_resource
 
82
  def parse_to_markdown(text):
83
  return text
84
 
85
+ def load_file(file_name):
86
+ with open(file_name, "r", encoding='utf-8') as file:
87
+ #with open(file_name, "r") as file:
88
+ content = file.read()
89
+ return content
90
 
91
  def extract_urls(text):
92
  try:
 
93
  date_pattern = re.compile(r'### (\d{2} \w{3} \d{4})')
94
  abs_link_pattern = re.compile(r'\[(.*?)\]\((https://arxiv\.org/abs/\d+\.\d+)\)')
95
  pdf_link_pattern = re.compile(r'\[⬇️\]\((https://arxiv\.org/pdf/\d+\.\d+)\)')
96
  title_pattern = re.compile(r'### \d{2} \w{3} \d{4} \| \[(.*?)\]')
 
 
97
  date_matches = date_pattern.findall(text)
98
  abs_link_matches = abs_link_pattern.findall(text)
99
  pdf_link_matches = pdf_link_pattern.findall(text)
100
  title_matches = title_pattern.findall(text)
101
 
102
+ # markdown with the extracted fields
103
  markdown_text = ""
104
  for i in range(len(date_matches)):
105
  date = date_matches[i]
106
  title = title_matches[i]
107
  abs_link = abs_link_matches[i][1]
108
  pdf_link = pdf_link_matches[i]
 
109
  markdown_text += f"**Date:** {date}\n\n"
110
  markdown_text += f"**Title:** {title}\n\n"
111
  markdown_text += f"**Abstract Link:** [{abs_link}]({abs_link})\n\n"
112
  markdown_text += f"**PDF Link:** [{pdf_link}]({pdf_link})\n\n"
113
  markdown_text += "---\n\n"
 
114
  return markdown_text
115
+
116
  except:
117
  st.write('.')
118
  return ''
119
 
 
 
120
  def download_pdfs(urls):
121
  local_files = []
122
  for url in urls:
 
140
  def search_arxiv(query):
141
  start_time = time.strftime("%Y-%m-%d %H:%M:%S")
142
  client = Client("awacke1/Arxiv-Paper-Search-And-QA-RAG-Pattern")
 
 
 
143
  response1 = client.predict(
144
  query,
145
  20,
 
149
  )
150
  Question = '### 🔎 ' + query + '\r\n' # Format for markdown display with links
151
  References = response1[0]
 
 
152
  ReferenceLinks = extract_urls(References)
153
 
154
  RunSecondQuery = True
 
169
 
170
  st.write('🔍Run of Multi-Agent System Paper Summary Spec is Complete')
171
  end_time = time.strftime("%Y-%m-%d %H:%M:%S")
 
 
172
  start_timestamp = time.mktime(time.strptime(start_time, "%Y-%m-%d %H:%M:%S"))
173
  end_timestamp = time.mktime(time.strptime(end_time, "%Y-%m-%d %H:%M:%S"))
174
  elapsed_seconds = end_timestamp - start_timestamp
 
202
  PromptPrefix2 = 'Create a streamlit python user app with full code listing to create a UI implementing the using streamlit, gradio, huggingface to create user interface elements like emoji buttons, sliders, drop downs, and data interfaces like dataframes to show tables, session_statematching this ruleset and thematic story plot line: '
203
  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:'
204
 
205
+ # MoE Roleplaying Technique for Context Experts
206
  roleplaying_glossary = {
207
+ "🤖 AI Concepts": {
208
+ "MoE (Mixture of Experts) 🧠": [
209
+ "As a leading AI health researcher, provide an overview of MoE, MAS, memory, and mirroring in healthcare applications.",
210
+ "Explain how MoE and MAS can be leveraged to create AGI and AMI systems for healthcare, as an AI architect.",
211
+ "Discuss the key concepts, benefits, and challenges of self-rewarding AI in healthcare, as an expert.",
212
+ "Identify the top 3 pain points that MoE addresses in AI and healthcare, such as complexity and resource allocation.",
213
+ "Describe the top 3 joys of the MoE solution, including improved performance and adaptability in healthcare AI.",
214
+ "Highlight the top 3 superpowers MoE gives users, like tackling complex problems and personalizing interventions.",
215
+ "Identify the top 3 problems MoE solves in AI and healthcare, such as model complexity, lack of specialization, and inefficient resource allocation, and explain how it addresses each problem effectively.",
216
+ "Outline the 3 essential method steps required for implementing MoE in AI systems, highlighting the novelty and significance of each step in advancing healthcare applications.",
217
+ "Discuss the innovative aspects of the MoE method steps and how they differ from traditional approaches, contributing to advancements in AI and healthcare.",
218
+ "Propose 3 creative ways to structure MoE-based projects and collaborations to optimize performance, efficiency, and impact in healthcare AI applications."
219
+ ],
220
+ "Multi Agent Systems (MAS) 🤝": [
221
+ "As a renowned MAS researcher, describe the key characteristics of distributed, autonomous, and cooperative MAS.",
222
+ "Discuss how MAS is applied in robotics, simulations, and decentralized problem-solving, as an AI engineer.",
223
+ "Provide insights into future trends and breakthroughs in MAS research and applications, as a thought leader.",
224
+ "Identify the top 3 pain points MAS addresses in complex environments, such as coordination and adaptability.",
225
+ "Describe the top 3 joys of the MAS solution, including enhanced collaboration and emergent behaviors in AI.",
226
+ "Highlight the top 3 superpowers MAS gives users, like modeling complex systems and building resilient applications.",
227
+ "Identify the top 3 problems MAS solves in complex, distributed environments, such as lack of coordination, limited adaptability, and centralized control, and explain how it addresses each problem effectively.",
228
+ "Outline the 3 essential method steps required for designing and implementing MAS, highlighting the novelty and significance of each step in advancing AI applications.",
229
+ "Discuss the innovative aspects of the MAS method steps and how they differ from traditional approaches, contributing to advancements in distributed AI systems.",
230
+ "Propose 3 creative ways to structure MAS-based projects and collaborations to optimize performance, efficiency, and impact in various AI domains."
231
+ ],
232
+ "Self Rewarding AI 🎁": [
233
+ "As a leading expert, discuss the main research areas in developing AI with intrinsic motivation and goal-setting.",
234
+ "Explain how self-rewarding AI enables open-ended development and adaptability, as a curiosity-driven researcher.",
235
+ "Share your vision for the future of AI systems that autonomously set goals, learn, and adapt, as a pioneer.",
236
+ "Identify the top 3 pain points self-rewarding AI addresses, such as lack of motivation and limited adaptability.",
237
+ "Describe the top 3 joys of the self-rewarding AI solution, including autonomous learning and novel solutions.",
238
+ "Highlight the top 3 superpowers self-rewarding AI gives users, like creating continuously improving AI systems.",
239
+ "Identify the top 3 problems self-rewarding AI solves in current AI systems, such as lack of intrinsic motivation, limited adaptability, and reliance on external rewards, and explain how it addresses each problem effectively.",
240
+ "Outline the 3 essential method steps required for developing self-rewarding AI systems, highlighting the novelty and significance of each step in advancing autonomous AI.",
241
+ "Discuss the innovative aspects of the self-rewarding AI method steps and how they differ from traditional approaches, contributing to advancements in open-ended AI development.",
242
+ "Propose 3 creative ways to structure self-rewarding AI projects and collaborations to optimize performance, efficiency, and impact in creating adaptive and self-motivated AI systems."
243
+ ]
244
+ },
245
+ "🛠️ AI Tools & Platforms": {
246
+ "ChatDev 💬": [
247
+ "As a chatbot developer, ask about the features and capabilities ChatDev offers for building conversational AI.",
248
+ "Inquire about the pre-built assets, integrations, and multi-platform support in ChatDev, as a product manager.",
249
+ "Ask how ChatDev facilitates chatbot development, deployment, and analytics across channels, as a business owner.",
250
+ "Identify the top 3 challenges ChatDev helps overcome in chatbot development, such as customization and management.",
251
+ "Outline the top 3 essential method steps in building chatbots with ChatDev, emphasizing novelty and efficiency.",
252
+ "Propose 3 innovative ways to structure chatbot projects using ChatDev for optimizing speed, engagement, and deployment.",
253
+ "Identify the top 3 problems ChatDev solves in chatbot development, such as limited customization, lack of multi-platform support, and difficulty in managing conversational flows, and explain how it addresses each problem effectively.",
254
+ "Outline the 3 essential method steps required for building chatbots using ChatDev, highlighting the novelty and significance of each step in streamlining the development process.",
255
+ "Discuss the innovative aspects of the ChatDev method steps and how they differ from traditional approaches, contributing to advancements in conversational AI development.",
256
+ "Propose 3 creative ways to structure chatbot projects using ChatDev to optimize performance, efficiency, and impact in creating engaging and multi-platform conversational experiences."
257
+ ],
258
+ "Online Multiplayer Experiences 🌐": [
259
+ "As a game developer, explore the potential of online multiplayer experiences, including games, AR, and VR.",
260
+ "Discuss the future of image and video models in enhancing online multiplayer experiences, as a researcher.",
261
+ "Inquire about the challenges and opportunities in creating immersive and interactive online multiplayer environments.",
262
+ "Identify the top 3 problems online multiplayer experiences solve, such as limited social interaction, lack of realism, and difficulty in creating engaging content, and explain how they address each problem effectively.",
263
+ "Outline the 3 essential method steps required for developing cutting-edge online multiplayer experiences, highlighting the novelty and significance of each step in advancing gaming, AR, and VR.",
264
+ "Discuss the innovative aspects of online multiplayer experience development and how they differ from traditional approaches, contributing to advancements in immersive technologies.",
265
+ "Propose 3 creative ways to structure online multiplayer projects and collaborations to optimize performance, efficiency, and impact in creating captivating and socially engaging experiences.",
266
+ "Explore the potential of integrating AI and machine learning techniques in online multiplayer experiences to enhance player interactions, generate dynamic content, and personalize experiences.",
267
+ "Discuss the ethical considerations and challenges in developing online multiplayer experiences, such as ensuring fair play, protecting user privacy, and moderating user-generated content.",
268
+ "Identify the key trends and future directions in online multiplayer experiences, considering advancements in AI, AR, VR, and cloud computing technologies."
269
+ ]
270
+ },
271
+ "🔬 Science Topics": {
272
+ "Physics 🔭": [
273
+ "As a Physics student, ask about the main branches and research areas in Physics and their interconnections.",
274
+ "Discuss the current state and future directions of Astrophysics research, as a researcher in the field.",
275
+ "Explain how General Relativity, Quantum Cosmology, and Mathematical Physics interrelate, as a theorist.",
276
+ "Identify the top 3 fundamental questions in Physics that recent research aims to answer and their implications.",
277
+ "Outline the top 3 essential method steps in conducting cutting-edge Physics research, emphasizing novelty.",
278
+ "Propose 3 innovative ways to structure research collaborations in Physics for interdisciplinary breakthroughs.",
279
+ "Identify the top 3 problems physics research solves, such as understanding fundamental laws, resolving theory inconsistencies, and exploring the universe's origins, and explain how it addresses each problem effectively.",
280
+ "Outline the 3 essential method steps required for conducting cutting-edge physics research, highlighting the novelty and significance of each step in advancing our understanding of the universe.",
281
+ "Discuss the innovative aspects of the physics research method steps and how they differ from traditional approaches, contributing to advancements in the field.",
282
+ "Propose 3 creative ways to structure physics research projects and collaborations to optimize performance, efficiency, and impact in making groundbreaking discoveries."
283
+ ],
284
+ "Mathematics ➗": [
285
+ "As a Mathematics enthusiast, inquire about the main branches of Mathematics and their key research areas.",
286
+ "Ask about the main branches of pure Mathematics, like Algebra and Geometry, and their fundamental concepts.",
287
+ "Discuss how Probability, Statistics, and Applied Math relate to other Mathematical fields, as an applied mathematician.",
288
+ "Identify the top 3 unsolved problems in Mathematics that researchers are actively working on and their significance.",
289
+ "Describe the top 3 core method steps in advancing mathematical research, highlighting novelty and creativity.",
290
+ "Suggest 3 innovative ways to structure mathematical research and collaborations for discoveries and applications.",
291
+ "Identify the top 3 problems mathematics research solves, such as proving theorems, developing new tools, and finding real-world applications, and explain how it addresses each problem effectively.",
292
+ "Outline the 3 essential method steps required for advancing mathematical research, highlighting the novelty and significance of each step in expanding mathematical knowledge.",
293
+ "Discuss the innovative aspects of the mathematical research method steps and how they differ from traditional approaches, contributing to advancements in the field.",
294
+ "Propose 3 creative ways to structure mathematical research projects and collaborations to optimize performance, efficiency, and impact in making novel discoveries and finding interdisciplinary applications."
295
+ ],
296
+ "Computer Science 💻": [
297
+ "As a Computer Science student, ask about the main research areas shaping the future of computing.",
298
+ "Discuss the major research topics in AI, ML, NLP, Vision, Graphics, and Robotics, as an AI researcher.",
299
+ "Inquire about the interconnections between Algorithms, Data Structures, Databases, and Programming Languages.",
300
+ "Identify the top 3 critical challenges in Computer Science that current research aims to address and approaches.",
301
+ "Outline the top 3 essential method steps in conducting groundbreaking Computer Science research, emphasizing novelty.",
302
+ "Propose 3 creative ways to structure research projects in Computer Science for innovation and real-world applications.",
303
+ "Identify the top 3 problems computer science research solves, such as developing efficient algorithms, building secure systems, and advancing AI and machine learning, and explain how it addresses each problem effectively.",
304
+ "Outline the 3 essential method steps required for conducting groundbreaking computer science research, highlighting the novelty and significance of each step in pushing the boundaries of computing.",
305
+ "Discuss the innovative aspects of the computer science research method steps and how they differ from traditional approaches, contributing to advancements in the field.",
306
+ "Propose 3 creative ways to structure computer science research projects and collaborations to optimize performance, efficiency, and impact in driving innovation and solving real-world problems."
307
+ ]
308
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  }
 
 
310
  # This displays per video and per image.
311
  @st.cache_resource
312
  def display_glossary_entity(k):
 
315
  "🃏Analyst": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
316
  "📚PyCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
317
  "🔬JSCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
318
+ "📖": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
319
+ "🔍": lambda k: f"https://www.google.com/search?q={quote(k)}",
320
+ "🔎": lambda k: f"https://www.bing.com/search?q={quote(k)}",
321
+ "🎥": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
322
+ "🐦": lambda k: f"https://twitter.com/search?q={quote(k)}",
323
  }
324
  links_md = ' '.join([f"[{emoji}]({url(k)})" for emoji, url in search_urls.items()])
325
  #st.markdown(f"{k} {links_md}", unsafe_allow_html=True)
 
333
  "🃏Analyst": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix)}", # this url plus query!
334
  "📚PyCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix2)}", # this url plus query!
335
  "🔬JSCoder": lambda k: f"/?q={quote(k)}-{quote(PromptPrefix3)}", # this url plus query!
336
+ "📖": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
337
+ "🔍": lambda k: f"https://www.google.com/search?q={quote(k)}",
338
+ "▶️": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
339
+ "🔎": lambda k: f"https://www.bing.com/search?q={quote(k)}",
340
+ "🎥": lambda k: f"https://www.youtube.com/results?search_query={quote(k)}",
341
+ "🐦": lambda k: f"https://twitter.com/search?q={quote(k)}",
342
  }
343
 
344
  for category, details in roleplaying_glossary.items():
 
654
  if ShowSideImages:
655
  SideBarImageShuffle()
656
 
657
+
658
+
659
+ # Scoring for feedback: ----------------------------------------------------- emoji
660
+
661
  # Ensure the directory for storing scores exists
662
  score_dir = "scores"
663
  os.makedirs(score_dir, exist_ok=True)
 
674
  score_data = json.load(file)
675
  else:
676
  score_data = {"clicks": 0, "score": 0}
677
+ score_data["clicks"] += increment
678
  score_data["score"] += increment
679
  with open(score_file, "w") as file:
680
  json.dump(score_data, file)
 
867
 
868
  # Adjusted display_buttons_with_scores function
869
  def display_buttons_with_scores(num_columns_text):
 
 
870
  for category, games in roleplaying_glossary.items():
871
  category_emoji = topic_emojis.get(category, "🔍") # Default to search icon if no match
872
  st.markdown(f"## {category_emoji} {category}")
 
876
  key = f"{category}_{game}_{term}".replace(' ', '_').lower()
877
  score = load_score(key)
878
  if st.button(f"{game_emoji} {category} {game} {term} {score}", key=key):
879
+ newscore = update_score(key.replace('?',''))
 
880
  query_prefix = f"{category_emoji} {game_emoji} ** {category} - {game} - {term} - **"
881
+ st.markdown("Scored " + query_prefix + ' with score ' + str(newscore) + '.')
 
 
 
 
882
 
883
 
884
  def get_all_query_params(key):
 
1560
  filename = generate_filename(f"{user_prompt}_section_{i+1}", choice)
1561
  create_file(filename, user_prompt, response, should_save)
1562
  st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
1563
+
1564
+ display_glossary_grid(roleplaying_glossary) # Word Glossary Jump Grid - Dynamically calculates columns based on details length to keep topic together
1565
+
1566
 
1567
+ num_columns_video=st.slider(key="num_columns_video", label="Choose Number of Video Columns", min_value=1, max_value=15, value=4)
1568
  display_videos_and_links(num_columns_video) # Video Jump Grid
1569
 
1570
+ num_columns_images=st.slider(key="num_columns_images", label="Choose Number of Image Columns", min_value=1, max_value=15, value=4)
1571
  display_images_and_wikipedia_summaries(num_columns_images) # Image Jump Grid
1572
 
 
 
1573
  num_columns_text=st.slider(key="num_columns_text", label="Choose Number of Text Columns", min_value=1, max_value=15, value=4)
1574
  display_buttons_with_scores(num_columns_text) # Feedback Jump Grid
1575