azaninello commited on
Commit
c412150
1 Parent(s): a8d925c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,6 +1,12 @@
1
  import gradio as gr
2
  import transformers
3
  from transformers import AutoModelWithLMHead, AutoTokenizer, pipeline
 
 
 
 
 
 
4
 
5
  shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('LorenzoDeMattei/GePpeTto'),
6
  tokenizer='LorenzoDeMattei/GePpeTto',
 
1
  import gradio as gr
2
  import transformers
3
  from transformers import AutoModelWithLMHead, AutoTokenizer, pipeline
4
+ from transformers import GPT2Tokenizer, GPT2Model
5
+
6
+ model = GPT2Model.from_pretrained('LorenzoDeMattei/GePpeTto')
7
+ tokenizer = GPT2Tokenizer.from_pretrained(
8
+ 'LorenzoDeMattei/GePpeTto',
9
+ )
10
 
11
  shroom_generator = pipeline("text-generation", model=AutoModelWithLMHead.from_pretrained('LorenzoDeMattei/GePpeTto'),
12
  tokenizer='LorenzoDeMattei/GePpeTto',