rootxhacker commited on
Commit
1ef9f76
·
verified ·
1 Parent(s): 96e9aa5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -116,12 +116,11 @@ Suggestions:
116
 
117
  Now, review the following code using this approach:
118
 
119
- {code_to_analyze}
120
-
121
- Provide a detailed review following the structure above, including understanding the code, identifying potential security issues, identifying potential logic vulnerabilities, and offering specific suggestions for improvement. Start your response with 'Code Review:' and end it with 'End of Review.'"
122
  """
123
 
124
- query = few_shot_prompt.format(code_to_analyze=code_to_analyze)
 
 
125
  full_result = get_completion(query, model, tokenizer)
126
 
127
  # Extract only the AI's answer
 
116
 
117
  Now, review the following code using this approach:
118
 
 
 
 
119
  """
120
 
121
+ # Concatenate the prompt with the code to analyze
122
+ query = few_shot_prompt + "\n\n" + code_to_analyze + "\n\nProvide a detailed review following the structure above, including understanding the code, identifying potential security issues, identifying potential logic vulnerabilities, and offering specific suggestions for improvement. Start your response with 'Code Review:' and end it with 'End of Review.'"
123
+
124
  full_result = get_completion(query, model, tokenizer)
125
 
126
  # Extract only the AI's answer