lbiester commited on
Commit
f0f7d30
·
verified ·
1 Parent(s): dc962d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ def greet(name):
9
  def classify(text):
10
  return {"cat": 0.3, "dog": 0.7}
11
 
12
- def predict_sentiment(text):
13
  if model == "finiteautomata/bertweet-base-sentiment-analysis":
14
  pipe = pipeline("text-classification", model="finiteautomata/bertweet-base-sentiment-analysis")
15
  out = pipe(text, return_all_scores=True)
 
9
  def classify(text):
10
  return {"cat": 0.3, "dog": 0.7}
11
 
12
+ def predict_sentiment(text, model):
13
  if model == "finiteautomata/bertweet-base-sentiment-analysis":
14
  pipe = pipeline("text-classification", model="finiteautomata/bertweet-base-sentiment-analysis")
15
  out = pipe(text, return_all_scores=True)