Spaces:
Sleeping
Sleeping
Update blueprints/summarize.py
Browse files- blueprints/summarize.py +1 -1
blueprints/summarize.py
CHANGED
|
@@ -35,7 +35,7 @@ def get_pipeline(model_name, task_type, hf_token):
|
|
| 35 |
# Load Pipeline
|
| 36 |
print(f"Loading model: {model_name}...")
|
| 37 |
if task_type == 'SEQ_2_SEQ_LM': # Summarization
|
| 38 |
-
pipe = pipeline("summarization", model=
|
| 39 |
elif task_type == 'TOKEN_CLS':
|
| 40 |
pipe = pipeline("token-classification", model=model_name, aggregation_strategy="simple")
|
| 41 |
else:
|
|
|
|
| 35 |
# Load Pipeline
|
| 36 |
print(f"Loading model: {model_name}...")
|
| 37 |
if task_type == 'SEQ_2_SEQ_LM': # Summarization
|
| 38 |
+
pipe = pipeline("summarization", model=model_name, device=device)
|
| 39 |
elif task_type == 'TOKEN_CLS':
|
| 40 |
pipe = pipeline("token-classification", model=model_name, aggregation_strategy="simple")
|
| 41 |
else:
|