Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import gradio as gr
|
|
3 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
4 |
import torch
|
5 |
|
|
|
6 |
def vipe_generate(text, model, tokenizer,device,do_sample,top_k=100, epsilon_cutoff=.00005, temperature=1):
|
7 |
#mark the text with special tokens
|
8 |
text=[tokenizer.eos_token + i + tokenizer.eos_token for i in text]
|
|
|
3 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
4 |
import torch
|
5 |
|
6 |
+
|
7 |
def vipe_generate(text, model, tokenizer,device,do_sample,top_k=100, epsilon_cutoff=.00005, temperature=1):
|
8 |
#mark the text with special tokens
|
9 |
text=[tokenizer.eos_token + i + tokenizer.eos_token for i in text]
|