jvroo commited on
Commit
76707ec
·
1 Parent(s): f1b6df5

Fix app remote

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ remote_model = "siebert/sentiment-roberta-large-english" # You can use the same
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):
@@ -45,7 +45,7 @@ def analyze_sentiment(review, mode):
45
  model_info = f"Using local model: {local_model}"
46
  elif mode == "Inference API":
47
  sentiment, score = remote_sentiment_analysis(review)
48
- model_info = f"Using remote model: {remote_model}"
49
  else:
50
  return "Invalid mode selected.", None
51
 
 
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_inference_client = InferenceClient(remote_model)
16
 
17
  # Function to perform sentiment analysis using the local pipeline
18
  def local_sentiment_analysis(review):
 
45
  model_info = f"Using local model: {local_model}"
46
  elif mode == "Inference API":
47
  sentiment, score = remote_sentiment_analysis(review)
48
+ model_info = f"Using remote model: {remote_inference_client}"
49
  else:
50
  return "Invalid mode selected.", None
51