fittar commited on
Commit
eff405c
·
1 Parent(s): 14e3b95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -3,7 +3,6 @@ import gradio as gr
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]
@@ -31,7 +30,6 @@ def generate(text):
31
  result =vipe_generate([text],model,tokenizer,do_sample=True,device=device)
32
  return result
33
 
34
-
35
  examples = [
36
  ["Is string theory right?"],
37
  ["She felt like a flower in December"],
 
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]
 
30
  result =vipe_generate([text],model,tokenizer,do_sample=True,device=device)
31
  return result
32
 
 
33
  examples = [
34
  ["Is string theory right?"],
35
  ["She felt like a flower in December"],