Oranblock commited on
Commit
8160119
·
verified ·
1 Parent(s): 49c259f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
6
  model_name = "EleutherAI/gpt-neo-1.3B" # Replace with your preferred model
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForCausalLM.from_pretrained(model_name)
9
- generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=0)
10
 
11
  # Predefined random options
12
  names = ["John Doe", "Jane Smith", "Ali Khan"]
 
6
  model_name = "EleutherAI/gpt-neo-1.3B" # Replace with your preferred model
7
  tokenizer = AutoTokenizer.from_pretrained(model_name)
8
  model = AutoModelForCausalLM.from_pretrained(model_name)
9
+ generator = pipeline("text-generation", model=model, tokenizer=tokenizer, device=-1) # Use CPU
10
 
11
  # Predefined random options
12
  names = ["John Doe", "Jane Smith", "Ali Khan"]