Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
| 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
|