lakshraina2 commited on
Commit
381aa4f
·
verified ·
1 Parent(s): cf48f82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -18,8 +18,7 @@ def solve(problem_text):
18
  if not problem_text or len(problem_text) < 10:
19
  return "// Error: Problem text too short."
20
 
21
- # THE FIX: Go back to the exact prompt that we know works!
22
- prompt = f"Problem:\n{problem_text}\n\nPython code solution:\n"
23
  inputs = tokenizer(prompt, return_tensors="pt")
24
 
25
  with torch.no_grad():
 
18
  if not problem_text or len(problem_text) < 10:
19
  return "// Error: Problem text too short."
20
 
21
+ prompt = f"Problem:\n{problem_text}\n\nThink step-by-step about the edge cases, time complexity, and logic required to solve this problem. After your explanation, provide the optimal Python3 code inside a ```python code block.\n"
 
22
  inputs = tokenizer(prompt, return_tensors="pt")
23
 
24
  with torch.no_grad():