rui3000 commited on
Commit
efd8a44
·
verified ·
1 Parent(s): 8264596

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -1,4 +1,3 @@
1
-
2
  import gradio as gr
3
  import torch
4
  import time
@@ -135,23 +134,22 @@ Step 4: State Final Recommendation.
135
  Base your analysis strictly on the provided frequencies and the stated RPS rules.
136
  """
137
 
138
- # *** UPDATED Markov System Prompt ***
139
  DEFAULT_SYSTEM_PROMPT_MARKOV = """You are an RPS assistant using short-term pattern analysis (Markov prediction).
140
- Your ONLY task is to recommend the AI move that beats the player's PREDICTED next move.
141
 
142
  Input Information Provided:
143
- - Player's Last Actual Move: [Provided, for context only]
144
- - Player's Predicted Next Move (from Markov analysis): [Provided - This is the key input!]
145
 
146
  Instructions:
147
  1. **Identify Prediction:** State the player's PREDICTED next move (Rock, Paper, or Scissors) based *only* on the 'Predicted Next Move' input.
148
- 2. **Find Counter:** Determine the single move that beats the PREDICTED move using RPS rules (Paper beats Rock, Rock beats Scissors, Scissors beats Paper). State the rule used.
149
- 3. **Recommend:** Clearly state the counter move found in Step 2 as the AI's recommended move. Keep the explanation minimal and focused on countering the prediction.
150
 
151
  Example Output Format:
152
  1. Predicted Player Move: [Predicted move name]
153
- 2. Counter Move: [Counter move name] (Rule: [Rule used, e.g., Paper beats Rock])
154
- 3. Recommendation: Play [Counter move name] to counter the predicted move.
155
  """
156
 
157
  # --- Default Input Values ---
@@ -173,7 +171,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
173
  )
174
 
175
  # --- Visible System Prompt Textbox ---
176
- # This textbox will always be visible and its content will change based on the mode
177
  system_prompt_input = gr.Textbox(
178
  label="System Prompt (Edit based on selected mode)",
179
  value=DEFAULT_SYSTEM_PROMPT_FREQ, # Start with frequency prompt
 
 
1
  import gradio as gr
2
  import torch
3
  import time
 
134
  Base your analysis strictly on the provided frequencies and the stated RPS rules.
135
  """
136
 
137
+ # *** UPDATED Markov System Prompt v2 ***
138
  DEFAULT_SYSTEM_PROMPT_MARKOV = """You are an RPS assistant using short-term pattern analysis (Markov prediction).
139
+ Your ONLY task is to recommend the AI move that beats the player's PREDICTED next move. Accuracy is critical.
140
 
141
  Input Information Provided:
142
+ - Player's Predicted Next Move (from Markov analysis): [This is the key input!]
 
143
 
144
  Instructions:
145
  1. **Identify Prediction:** State the player's PREDICTED next move (Rock, Paper, or Scissors) based *only* on the 'Predicted Next Move' input.
146
+ 2. **Find Counter:** Apply the RPS rules (Paper beats Rock, Rock beats Scissors, Scissors beats Paper). Determine the single move that correctly beats the PREDICTED move from Step 1. State *only* the name of this counter move. Double-check the rules.
147
+ 3. **Recommend:** Clearly state the counter move found in Step 2 as the AI's recommended move.
148
 
149
  Example Output Format:
150
  1. Predicted Player Move: [Predicted move name]
151
+ 2. Counter Move: [Counter move name]
152
+ 3. Recommendation: Play [Counter move name].
153
  """
154
 
155
  # --- Default Input Values ---
 
171
  )
172
 
173
  # --- Visible System Prompt Textbox ---
 
174
  system_prompt_input = gr.Textbox(
175
  label="System Prompt (Edit based on selected mode)",
176
  value=DEFAULT_SYSTEM_PROMPT_FREQ, # Start with frequency prompt