Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
# ✅ Load the fastest model for code review
|
6 |
model_name = "EleutherAI/pythia-70m" # Smallest & fastest alternative
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
-
model = AutoModelForCausalLM.from_pretrained(model_name
|
9 |
|
10 |
# ✅ Function to analyze Python code
|
11 |
def review_code(code_snippet):
|
|
|
5 |
# ✅ Load the fastest model for code review
|
6 |
model_name = "EleutherAI/pythia-70m" # Smallest & fastest alternative
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
+
model = AutoModelForCausalLM.from_pretrained(model_name).to("cpu")
|
9 |
|
10 |
# ✅ Function to analyze Python code
|
11 |
def review_code(code_snippet):
|