Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)
|
@@ -41,9 +41,9 @@ with demo:
|
|
41 |
fn=predict_sentiment,
|
42 |
inputs=[
|
43 |
gr.Textbox(placeholder="Your text input"),
|
44 |
-
gr.Dropdown(
|
45 |
-
|
46 |
-
),
|
47 |
],
|
48 |
outputs="label"
|
49 |
)
|
|
|
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)
|
|
|
41 |
fn=predict_sentiment,
|
42 |
inputs=[
|
43 |
gr.Textbox(placeholder="Your text input"),
|
44 |
+
# gr.Dropdown(
|
45 |
+
# ["finiteautomata/bertweet-base-sentiment-analysis", "vader"], label="Model"
|
46 |
+
# ),
|
47 |
],
|
48 |
outputs="label"
|
49 |
)
|