wannaphong commited on
Commit
fd65fd5
·
verified ·
1 Parent(s): 49b4b1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
- generator = pipeline('text-generation', model='wannaphong/mark2_d24')
5
 
6
  def generate(text):
7
- return generator(text,max_new_tokens=100)[0]["generated_text"] # use yield from#result = generator(text, max_length=30, num_return_sequences=1)
8
  # return result[0]["generated_text"] # type: ignore
9
 
10
  examples = [
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ generator = pipeline('text-generation', model='wannaphong/mark2')
5
 
6
  def generate(text):
7
+ return generator(text,max_new_tokens=124)[0]["generated_text"] # use yield from#result = generator(text, max_length=30, num_return_sequences=1)
8
  # return result[0]["generated_text"] # type: ignore
9
 
10
  examples = [