aryn25 commited on
Commit
a3734e0
·
verified ·
1 Parent(s): c6a5be0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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 this headline as Left, Center, or Right: '{headline}'"
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