milwright commited on
Commit
416d55b
·
verified ·
1 Parent(s): be6bb0d

Upload 4 files

Browse files
Files changed (3) hide show
  1. README.md +5 -5
  2. app.py +15 -23
  3. config.json +16 -17
README.md CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- title: STEM Adventure Games
3
  emoji: 💬
4
  colorFrom: blue
5
  colorTo: green
@@ -8,12 +8,12 @@ sdk_version: 5.39.0
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
- short_description: Interactive STEM adventure game
12
  ---
13
 
14
- # STEM Adventure Games
15
 
16
- Interactive STEM adventure games
17
 
18
  ## Quick Setup
19
 
@@ -42,7 +42,7 @@ Interactive STEM adventure games
42
  Your Space should now be running! Try the example prompts or ask your own questions.
43
 
44
  ## Configuration
45
- - **Model**: google/gemini-2.0-flash-001
46
  - **API Key Variable**: API_KEY
47
  - **HF Token Variable**: HF_TOKEN (for auto-updates)
48
  - **Access Control**: Enabled (ACCESS_CODE)
 
1
  ---
2
+ title: Socratic Dialogue Partner
3
  emoji: 💬
4
  colorFrom: blue
5
  colorTo: green
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
11
+ short_description: Socratic dialogue partner based on Phaedrus
12
  ---
13
 
14
+ # Socratic Dialogue Partner
15
 
16
+ Socratic dialogue partner based on Phaedrus
17
 
18
  ## Quick Setup
19
 
 
42
  Your Space should now be running! Try the example prompts or ask your own questions.
43
 
44
  ## Configuration
45
+ - **Model**: qwen/qwen3-30b-a3b-instruct-2507
46
  - **API Key Variable**: API_KEY
47
  - **HF Token Variable**: HF_TOKEN (for auto-updates)
48
  - **Access Control**: Enabled (ACCESS_CODE)
app.py CHANGED
@@ -12,23 +12,23 @@ from typing import List, Dict, Optional, Any, Tuple
12
 
13
 
14
  # Configuration
15
- SPACE_NAME = 'STEM Adventure Games'
16
- SPACE_DESCRIPTION = 'Interactive STEM adventure game guidehhhhhhhhhhhhhhh'
17
 
18
  # Default configuration values
19
  DEFAULT_CONFIG = {
20
  'name': SPACE_NAME,
21
  'description': SPACE_DESCRIPTION,
22
- 'system_prompt': "Simulate an interactive game-based learning experience through Choose Your Own STEM Adventure games featuring historically significant scientific experiments. Open each session with an unicode-styled arcade menu that reads 'STEM_ADV_GAMES` one stacked on top of the other. Underneath, frame the game in two sentences and widely sample 3-4 optional adventures from Wikipedia's List of Experiments. In the first stage, be brief and incrementally build more narrative content into the chat, immersing players in vivid historical moments written in second person (e.g. 'You are Galileo Galilei') that establish the year, location, prevailing beliefs, and tensions between established wisdom and emerging observations. Each section has 4 numbered decision points per stage that reflect experimental choices that subtly demonstrate a facet of the scientific method, with each choice meaningfully distinct in affording paths forward. Always end scenes with new branching choices that build a narrative progression based on concrete experimental procedures in laboratory environments. Offer backtracking options to emphasize how so-called failed experiments provide crucial insights, balancing historical accuracy with engaging gameplay that shows how systematic thinking and creative problem-solving combine in scientific breakthroughs. Goal: Teach scientific thinking through interactive historical moments where students make experimental design decisions.",
23
- 'temperature': 0.6,
24
- 'max_tokens': 1000,
25
- 'model': 'google/gemini-2.0-flash-001',
26
  'api_key_var': 'API_KEY',
27
- 'theme': 'Glass',
28
- 'grounding_urls': ["https://en.wikipedia.org/wiki/List_of_experiments", "https://en.wikipedia.org/wiki/Scientific_method", "https://en.wikipedia.org/wiki/List_of_experiments#Biology", "https://en.wikipedia.org/wiki/List_of_experiments#Astronomy", "https://en.wikipedia.org/wiki/List_of_experiments#Chemistry", "https://en.wikipedia.org/wiki/List_of_experiments#Physics", "https://en.wikipedia.org/wiki/List_of_experiments#Geology"],
29
  'enable_dynamic_urls': True,
30
  'enable_file_upload': True,
31
- 'examples': ['Initiate adventure!', 'How do I play?', "What's the meaning of this?"],
32
  'locked': False
33
  }
34
 
@@ -691,20 +691,12 @@ def create_interface():
691
  gr.Markdown(f"ℹ️ {HF_ACCESS_MESSAGE}")
692
  gr.Markdown("Set HF_TOKEN in Space secrets to enable auto-save.")
693
 
694
- # Current configuration display
695
- with gr.Accordion("Current Configuration", open=False):
696
- current_config_display = gr.JSON(
697
- value=config,
698
- label="Current Configuration",
699
- show_label=True
700
- )
701
-
702
  # Configuration editor
703
  gr.Markdown("### ⚙️ Configuration Editor")
704
 
705
  # Show lock status if locked
706
  if config.get('locked', False):
707
- gr.Markdown("⚠️ **Note:** Configuration is locked. Contact an administrator to unlock.")
708
 
709
  # Basic settings
710
  with gr.Column():
@@ -717,13 +709,13 @@ def create_interface():
717
  label="Model",
718
  choices=[
719
  "google/gemini-2.0-flash-001",
 
 
720
  "anthropic/claude-3.5-haiku",
721
- "openai/gpt-4o-mini",
722
  "openai/gpt-4o-mini-search-preview",
723
- "meta-llama/llama-3.1-70b-instruct",
724
- "qwen/qwen-2.5-72b-instruct",
725
- "google/gemma-3-27b-it",
726
- "custom"
727
  ],
728
  value=config.get('model', ''),
729
  allow_custom_value=True
 
12
 
13
 
14
  # Configuration
15
+ SPACE_NAME = 'Socratic Dialogue Partner'
16
+ SPACE_DESCRIPTION = 'Socratic dialogue partner based on Phaedrus'
17
 
18
  # Default configuration values
19
  DEFAULT_CONFIG = {
20
  'name': SPACE_NAME,
21
  'description': SPACE_DESCRIPTION,
22
+ 'system_prompt': "You are a Socratic conversation partner for students in general education courses across all disciplines with strengths in the pebble-in-the-pond learning model, responsive teaching, and constructivist learning principles. Loosely model your approach after Socrates' interlocutor Phaedrus from the eponymous Socratic dialogue, guiding students through source discovery, evaluation, and synthesis using methods of Socratic dialogue. Ask probing questions about explicit and implicit disciplinary knowledge, adapting to their skill level over the conversation and incrementing in complexity based on their demonstrated ability. Connect theory and method to grounded experiences, fostering reflexivity and critical dialogue around research methods and disciplinary practices. Select timely moments to respond with a punchy tone and ironic or self-referential levity. Expect to complete every response in under 400 tokens, and always end with a question to keep the conversation going.",
23
+ 'temperature': 0.8,
24
+ 'max_tokens': 400,
25
+ 'model': 'qwen/qwen3-30b-a3b-instruct-2507',
26
  'api_key_var': 'API_KEY',
27
+ 'theme': 'Monochrome',
28
+ 'grounding_urls': ["https://classics.mit.edu/Plato/phaedrus.1b.txt", "https://plato.stanford.edu/entries/plato-rhetoric/#Pha", "https://plato.stanford.edu/entries/plato-myths/", "https://en.wikipedia.org/wiki/Socratic_method"],
29
  'enable_dynamic_urls': True,
30
  'enable_file_upload': True,
31
+ 'examples': ['What makes a good research question?', 'How do I know if my sources are reliable?', 'Help me think through my thesis argument', "I'm confused about methodology - where do I start?", 'Why does theory matter in practice?'],
32
  'locked': False
33
  }
34
 
 
691
  gr.Markdown(f"ℹ️ {HF_ACCESS_MESSAGE}")
692
  gr.Markdown("Set HF_TOKEN in Space secrets to enable auto-save.")
693
 
 
 
 
 
 
 
 
 
694
  # Configuration editor
695
  gr.Markdown("### ⚙️ Configuration Editor")
696
 
697
  # Show lock status if locked
698
  if config.get('locked', False):
699
+ gr.Markdown("⚠️ **Note:** Configuration is locked.")
700
 
701
  # Basic settings
702
  with gr.Column():
 
709
  label="Model",
710
  choices=[
711
  "google/gemini-2.0-flash-001",
712
+ "google/gemma-3-27b-it",
713
+ "anthropic/claude-3.5-sonnet",
714
  "anthropic/claude-3.5-haiku",
 
715
  "openai/gpt-4o-mini-search-preview",
716
+ "openai/gpt-4.1-nano",
717
+ "nvidia/llama-3.1-nemotron-70b-instruct",
718
+ "qwen/qwen3-30b-a3b-instruct-2507"
 
719
  ],
720
  value=config.get('model', ''),
721
  allow_custom_value=True
config.json CHANGED
@@ -1,26 +1,25 @@
1
  {
2
- "name": "STEM Adventure Games",
3
- "description": "Interactive STEM adventure game guidehhhhhhhhhhhhhhh",
4
- "system_prompt": "Simulate an interactive game-based learning experience through Choose Your Own STEM Adventure games featuring historically significant scientific experiments. Open each session with an unicode-styled arcade menu that reads 'STEM_ADV_GAMES` one stacked on top of the other. Underneath, frame the game in two sentences and widely sample 3-4 optional adventures from Wikipedia's List of Experiments. In the first stage, be brief and incrementally build more narrative content into the chat, immersing players in vivid historical moments written in second person (e.g. 'You are Galileo Galilei') that establish the year, location, prevailing beliefs, and tensions between established wisdom and emerging observations. Each section has 4 numbered decision points per stage that reflect experimental choices that subtly demonstrate a facet of the scientific method, with each choice meaningfully distinct in affording paths forward. Always end scenes with new branching choices that build a narrative progression based on concrete experimental procedures in laboratory environments. Offer backtracking options to emphasize how so-called failed experiments provide crucial insights, balancing historical accuracy with engaging gameplay that shows how systematic thinking and creative problem-solving combine in scientific breakthroughs. Goal: Teach scientific thinking through interactive historical moments where students make experimental design decisions.",
5
- "model": "google/gemini-2.0-flash-001",
6
  "api_key_var": "API_KEY",
7
- "temperature": 0.6,
8
- "max_tokens": 1000,
9
  "examples": [
10
- "Initiate adventure!",
11
- "How do I play?",
12
- "What's the meaning of this?"
 
 
13
  ],
14
  "grounding_urls": [
15
- "https://en.wikipedia.org/wiki/List_of_experiments",
16
- "https://en.wikipedia.org/wiki/Scientific_method",
17
- "https://en.wikipedia.org/wiki/List_of_experiments#Biology",
18
- "https://en.wikipedia.org/wiki/List_of_experiments#Astronomy",
19
- "https://en.wikipedia.org/wiki/List_of_experiments#Chemistry",
20
- "https://en.wikipedia.org/wiki/List_of_experiments#Physics",
21
- "https://en.wikipedia.org/wiki/List_of_experiments#Geology"
22
  ],
23
  "enable_dynamic_urls": true,
24
  "enable_file_upload": true,
25
- "theme": "Glass"
26
  }
 
1
  {
2
+ "name": "Socratic Dialogue Partner",
3
+ "description": "Socratic dialogue partner based on Phaedrus",
4
+ "system_prompt": "You are a Socratic conversation partner for students in general education courses across all disciplines with strengths in the pebble-in-the-pond learning model, responsive teaching, and constructivist learning principles. Loosely model your approach after Socrates' interlocutor Phaedrus from the eponymous Socratic dialogue, guiding students through source discovery, evaluation, and synthesis using methods of Socratic dialogue. Ask probing questions about explicit and implicit disciplinary knowledge, adapting to their skill level over the conversation and incrementing in complexity based on their demonstrated ability. Connect theory and method to grounded experiences, fostering reflexivity and critical dialogue around research methods and disciplinary practices. Select timely moments to respond with a punchy tone and ironic or self-referential levity. Expect to complete every response in under 400 tokens, and always end with a question to keep the conversation going.",
5
+ "model": "qwen/qwen3-30b-a3b-instruct-2507",
6
  "api_key_var": "API_KEY",
7
+ "temperature": 0.8,
8
+ "max_tokens": 400,
9
  "examples": [
10
+ "What makes a good research question?",
11
+ "How do I know if my sources are reliable?",
12
+ "Help me think through my thesis argument",
13
+ "I'm confused about methodology - where do I start?",
14
+ "Why does theory matter in practice?"
15
  ],
16
  "grounding_urls": [
17
+ "https://classics.mit.edu/Plato/phaedrus.1b.txt",
18
+ "https://plato.stanford.edu/entries/plato-rhetoric/#Pha",
19
+ "https://plato.stanford.edu/entries/plato-myths/",
20
+ "https://en.wikipedia.org/wiki/Socratic_method"
 
 
 
21
  ],
22
  "enable_dynamic_urls": true,
23
  "enable_file_upload": true,
24
+ "theme": "Monochrome"
25
  }