azaninello commited on
Commit
1bde40f
1 Parent(s): a18a223

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -2,7 +2,11 @@ import gradio as gr
2
  import transformers
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
4
 
5
- shroom_generator = pipeline("text-generation", model=AutoModelForCausalLM.from_pretrained('LorenzoDeMattei/GePpeTto'), tokenizer='LorenzoDeMattei/GePpeTto')
 
 
 
 
6
 
7
  def generator(inizia_la_storia = ''):
8
  shroom_result = shroom_generator(inizia_la_storia, max_length=120)
 
2
  import transformers
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
4
 
5
+ shroom_generator = pipeline("text-generation", model=AutoModelForCausalLM.from_pretrained('LorenzoDeMattei/GePpeTto'),
6
+ tokenizer='LorenzoDeMattei/GePpeTto',
7
+ max_length=50,
8
+ top_k=50,
9
+ top_p=0.95,)
10
 
11
  def generator(inizia_la_storia = ''):
12
  shroom_result = shroom_generator(inizia_la_storia, max_length=120)