Spaces:
Sleeping
Sleeping
jvroo
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,13 +6,13 @@ from huggingface_hub import InferenceClient
|
|
| 6 |
|
| 7 |
# Define models for local and remote inference
|
| 8 |
local_model = "distilbert-base-uncased-finetuned-sst-2-english"
|
| 9 |
-
remote_model = "
|
| 10 |
|
| 11 |
# Load the local sentiment analysis pipeline with the specified model
|
| 12 |
local_pipeline = pipeline("sentiment-analysis", model=local_model)
|
| 13 |
|
| 14 |
# Initialize the inference pipeline for remote model (same model for simplicity here)
|
| 15 |
-
remote_pipeline = InferenceClient(
|
| 16 |
|
| 17 |
# Function to perform sentiment analysis using the local pipeline
|
| 18 |
def local_sentiment_analysis(review):
|
|
|
|
| 6 |
|
| 7 |
# Define models for local and remote inference
|
| 8 |
local_model = "distilbert-base-uncased-finetuned-sst-2-english"
|
| 9 |
+
remote_model = "siebert/sentiment-roberta-large-english" # You can use the same model for both for now
|
| 10 |
|
| 11 |
# Load the local sentiment analysis pipeline with the specified model
|
| 12 |
local_pipeline = pipeline("sentiment-analysis", model=local_model)
|
| 13 |
|
| 14 |
# Initialize the inference pipeline for remote model (same model for simplicity here)
|
| 15 |
+
remote_pipeline = InferenceClient(remote_model)
|
| 16 |
|
| 17 |
# Function to perform sentiment analysis using the local pipeline
|
| 18 |
def local_sentiment_analysis(review):
|