Spaces:
Running
Running
minor changes add Inference
Browse files
app.py
CHANGED
|
@@ -14,6 +14,8 @@ Please be patient until the demo app is loaded. """
|
|
| 14 |
|
| 15 |
sentiment = pipeline("text-classification", model='tabularisai/multilingual-sentiment-analysis') #"zero-shot-classification" model='facebook/bart-large-mnli')
|
| 16 |
|
|
|
|
|
|
|
| 17 |
def get_sentiment(text):
|
| 18 |
output = sentiment(text)
|
| 19 |
return f'The sentence was classified as "{output[0]["label"]}" with {output[0]["score"]*100}% confidence'
|
|
|
|
| 14 |
|
| 15 |
sentiment = pipeline("text-classification", model='tabularisai/multilingual-sentiment-analysis') #"zero-shot-classification" model='facebook/bart-large-mnli')
|
| 16 |
|
| 17 |
+
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 18 |
+
|
| 19 |
def get_sentiment(text):
|
| 20 |
output = sentiment(text)
|
| 21 |
return f'The sentence was classified as "{output[0]["label"]}" with {output[0]["score"]*100}% confidence'
|