mohsenfayyaz commited on
Commit
3dc0cd0
1 Parent(s): 42286b1

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='mohsenfayyaz/mt5-small-query_realestate_cars-finetuned')
5
 
6
  def generate(text):
7
- result = generator(text, max_length=100, num_return_sequences=1)
8
  return result[0]["generated_text"]
9
 
10
  examples = [
 
1
  import gradio as gr
2
  from transformers import pipeline
3
 
4
+ generator = pipeline('text2text-generation', model='mohsenfayyaz/mt5-small-query_realestate_cars-finetuned')
5
 
6
  def generate(text):
7
+ result = generator(text, max_length=200)
8
  return result[0]["generated_text"]
9
 
10
  examples = [