athv commited on
Commit
3c43ccb
·
verified ·
1 Parent(s): 0582940

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +4 -2
server.py CHANGED
@@ -56,12 +56,14 @@ def optimize_code():
56
  if optimizer_pipeline:
57
  print("Running Hugging Face model...")
58
 
59
- # Run the model.
60
- opt_.result = optimizer_pipeline(
 
61
  code_snippet,
62
  max_new_tokens=200,
63
  eos_token_id=tokenizer.eos_token_id # <-- THIS TELLS IT TO STOP
64
  )
 
65
 
66
  full_response = opt_result[0]['generated_text']
67
 
 
56
  if optimizer_pipeline:
57
  print("Running Hugging Face model...")
58
 
59
+ # --- THIS IS THE TYPO FIX ---
60
+ # It is 'opt_result', not 'opt_.result'
61
+ opt_result = optimizer_pipeline(
62
  code_snippet,
63
  max_new_tokens=200,
64
  eos_token_id=tokenizer.eos_token_id # <-- THIS TELLS IT TO STOP
65
  )
66
+ # --- END TYPO FIX ---
67
 
68
  full_response = opt_result[0]['generated_text']
69