CK42 commited on
Commit
5136fe5
1 Parent(s): a4edbac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -5,10 +5,10 @@ import requests.exceptions
5
  from huggingface_hub import HfApi, hf_hub_download
6
  from huggingface_hub.repocard import metadata_load
7
 
8
- pipe = joblib.load("https://huggingface.co/spaces/scikit-learn/sentiment-analysis/tree/main/pipeline.pkl")
9
- inputs = [gr.Textbox(value = "The customer service was satisfactory.")]
10
- outputs = [gr.Label(label = "Sentiment")]
11
- title = "Sentiment Analysis"
12
  app = gr.Blocks()
13
 
14
  def load_agent(model_id_1, model_id_2):
@@ -77,8 +77,8 @@ with app:
77
 
78
  app_button.click(load_agent, inputs=[model1_input, model2_input], outputs=[model1_name, model1_score_output, model2_name, model2_score_output])
79
 
80
- examples = gr.Examples(examples=[["scikit-learn/sentiment-analysis","scikit-learn/sentiment-analysis"],
81
- ["scikit-learn/sentiment-analysis", "scikit-learn/sentiment-analysis"]],
82
  inputs=[model1_input, model2_input])
83
 
84
 
 
5
  from huggingface_hub import HfApi, hf_hub_download
6
  from huggingface_hub.repocard import metadata_load
7
 
8
+ #pipe = joblib.load("https://huggingface.co/spaces/scikit-learn/sentiment-analysis/tree/main/pipeline.pkl")
9
+ #inputs = [gr.Textbox(value = "The customer service was satisfactory.")]
10
+ #outputs = [gr.Label(label = "Sentiment")]
11
+ #title = "Sentiment Analysis"
12
  app = gr.Blocks()
13
 
14
  def load_agent(model_id_1, model_id_2):
 
77
 
78
  app_button.click(load_agent, inputs=[model1_input, model2_input], outputs=[model1_name, model1_score_output, model2_name, model2_score_output])
79
 
80
+ examples = gr.Examples(examples=[["distilbert-base-uncased-finetuned-sst-2-english","distilbert-base-uncased-finetuned-sst-2-english"],
81
+ ["distilbert-base-uncased-finetuned-sst-2-english", "distilbert-base-uncased-finetuned-sst-2-english"]],
82
  inputs=[model1_input, model2_input])
83
 
84