Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ classifier = pipeline("text2text-generation", model="google/flan-t5-base", max_l
|
|
| 6 |
|
| 7 |
# Prompt template
|
| 8 |
def classify_bias(headline):
|
| 9 |
-
prompt = f"Classify the political bias of
|
| 10 |
output = classifier(prompt)[0]['generated_text'].strip()
|
| 11 |
return output
|
| 12 |
|
|
|
|
| 6 |
|
| 7 |
# Prompt template
|
| 8 |
def classify_bias(headline):
|
| 9 |
+
prompt = f"Classify the political bias of the following news headline into one of these three categories: Left, Center, or Right.\n\nHeadline: {headline}"
|
| 10 |
output = classifier(prompt)[0]['generated_text'].strip()
|
| 11 |
return output
|
| 12 |
|