pseudotensor commited on
Commit
150b73b
1 Parent(s): e93eb3d

Fix default for hf spaces

Browse files
Files changed (2) hide show
  1. app.py +0 -2
  2. open_strawberry.py +14 -8
app.py CHANGED
@@ -1,7 +1,5 @@
1
  import os
2
 
3
- import openai
4
-
5
  import streamlit as st
6
  import time
7
  try:
 
1
  import os
2
 
 
 
3
  import streamlit as st
4
  import time
5
  try:
open_strawberry.py CHANGED
@@ -413,14 +413,20 @@ def manage_conversation(model: str,
413
 
414
 
415
  def get_defaults() -> Tuple:
416
- initial_prompt = """Can you crack the code?
417
- 9 2 8 5 (One number is correct but in the wrong position)
418
- 1 9 3 7 (Two numbers are correct but in the wrong positions)
419
- 5 2 0 1 (one number is correct and in the right position)
420
- 6 5 0 7 (nothing is correct)
421
- 8 5 2 4 (two numbers are correct but in the wrong positions)"""
422
-
423
- expected_answer = "3841"
 
 
 
 
 
 
424
 
425
  system_prompt = """Let us play a game of "take only the most minuscule step toward the solution."
426
  <thinking_game>
 
413
 
414
 
415
  def get_defaults() -> Tuple:
416
+ on_hf_spaces = os.getenv("HF_SPACES", '0') == '1'
417
+ if on_hf_spaces:
418
+ initial_prompt = "How many r's are in strawberry?"
419
+ expected_answer = "3"
420
+ else:
421
+
422
+ initial_prompt = """Can you crack the code?
423
+ 9 2 8 5 (One number is correct but in the wrong position)
424
+ 1 9 3 7 (Two numbers are correct but in the wrong positions)
425
+ 5 2 0 1 (one number is correct and in the right position)
426
+ 6 5 0 7 (nothing is correct)
427
+ 8 5 2 4 (two numbers are correct but in the wrong positions)"""
428
+
429
+ expected_answer = "3841"
430
 
431
  system_prompt = """Let us play a game of "take only the most minuscule step toward the solution."
432
  <thinking_game>