Taidat commited on
Commit
b5a5da6
·
verified ·
1 Parent(s): 50f1d67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -47,9 +47,9 @@ prompt = PromptTemplate(
47
  )
48
 
49
  # === Load Falcon Model ===
50
- model_name = "mistralai/Mistral-7B-Instruct-v0.2"
51
- tokenizer = AutoTokenizer.from_pretrained(model_name)
52
- model = AutoModelForCausalLM.from_pretrained(model_name)
53
 
54
  generator = pipeline(
55
  "text-generation",
 
47
  )
48
 
49
  # === Load Falcon Model ===
50
+ tokenizer = GPT2Tokenizer.from_pretrained("gpt2")
51
+ model = AutoModelForCausalLM.from_pretrained("gpt2").to("cuda" if torch.cuda.is_available() else "cpu")
52
+
53
 
54
  generator = pipeline(
55
  "text-generation",