Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,11 @@ def summarize(text):
|
|
12 |
summarized_ids = model.generate(inputs['input_ids'], attention_mask=inputs['attention_mask'],
|
13 |
max_length=150, num_beams=4, early_stopping=True)
|
14 |
|
15 |
-
|
|
|
|
|
|
|
|
|
16 |
|
17 |
|
18 |
|
|
|
12 |
summarized_ids = model.generate(inputs['input_ids'], attention_mask=inputs['attention_mask'],
|
13 |
max_length=150, num_beams=4, early_stopping=True)
|
14 |
|
15 |
+
f= tokenizer.decode(summarized_ids[0], skip_special_tokens=True)
|
16 |
+
if f == 1:
|
17 |
+
return "positive"
|
18 |
+
else:
|
19 |
+
return "negative"
|
20 |
|
21 |
|
22 |
|