Update app.py
Browse files
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
|
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"]
|