mg98 commited on
Commit
f0eb71e
·
verified ·
1 Parent(s): 5d8747b

Fix max_length

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -4,7 +4,7 @@ from transformers import pipeline
4
  model_pipeline = pipeline("text2text-generation", model="tribler/dsi-search-on-toy-dataset")
5
 
6
  def process_query(query):
7
- results = model_pipeline(query)
8
  result_text = results[0]['generated_text'].strip()
9
  if result_text.startswith("http"):
10
  youtube_id = result_text.split('watch?v=')[-1]
 
4
  model_pipeline = pipeline("text2text-generation", model="tribler/dsi-search-on-toy-dataset")
5
 
6
  def process_query(query):
7
+ results = model_pipeline(query, max_length=60))
8
  result_text = results[0]['generated_text'].strip()
9
  if result_text.startswith("http"):
10
  youtube_id = result_text.split('watch?v=')[-1]