Update app.py
Browse files
app.py
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from transformers import
|
| 3 |
|
| 4 |
# Load the model and tokenizer
|
| 5 |
-
model_name = "migueldeguzmandev/
|
| 6 |
-
tokenizer =
|
| 7 |
-
model =
|
| 8 |
|
| 9 |
# Set the pad token ID to the EOS token ID
|
| 10 |
model.config.pad_token_id = model.config.eos_token_id
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
from transformers import GPT2Tokenizer, GPT2LMHeadModel
|
| 3 |
|
| 4 |
# Load the model and tokenizer
|
| 5 |
+
model_name = "migueldeguzmandev/GPT2XL_RLLMv"
|
| 6 |
+
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
|
| 7 |
+
model = GPT2LMHeadModel.from_pretrained(model_name)
|
| 8 |
|
| 9 |
# Set the pad token ID to the EOS token ID
|
| 10 |
model.config.pad_token_id = model.config.eos_token_id
|